Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: m-labs/artiq
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 72823cf52195
Choose a base ref
...
head repository: m-labs/artiq
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 5916c10b241d
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Aug 28, 2015

  1. ksupport: provide abort() to the kernel library.

    whitequark committed Aug 28, 2015
    Copy the full SHA
    79af228 View commit details
  2. Copy the full SHA
    5916c10 View commit details
Showing with 11 additions and 1 deletion.
  1. +3 −1 artiq/language/core.py
  2. +8 −0 soc/runtime/ksupport.c
4 changes: 3 additions & 1 deletion artiq/language/core.py
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
Core ARTIQ extensions to the Python language.
"""

import linecache, re
import os, linecache, re
from collections import namedtuple
from functools import wraps

@@ -394,6 +394,8 @@ def __str__(self):
else:
formatted_address = " (RA=0x{:x})".format(address)

filename = filename.replace(os.path.normpath(os.path.join(os.path.dirname(__file__),
"..")), "<artiq>")
if column == -1:
lines.append(" File \"{file}\", line {line}, in {function}{address}".
format(file=filename, line=line, function=function,
8 changes: 8 additions & 0 deletions soc/runtime/ksupport.c
Original file line number Diff line number Diff line change
@@ -17,6 +17,8 @@
#include "dds.h"
#include "rtio.h"

void ksupport_abort(void);

/* compiler-rt symbols */
extern void __divsi3, __modsi3, __ledf2, __gedf2, __unorddf2, __eqdf2, __ltdf2,
__nedf2, __gtdf2, __negsf2, __negdf2, __addsf3, __subsf3, __mulsf3,
@@ -82,6 +84,7 @@ static const struct symbol runtime_exports[] = {
{"__artiq_personality", &__artiq_personality},
{"__artiq_raise", &__artiq_raise},
{"__artiq_reraise", &__artiq_reraise},
{"abort", &ksupport_abort},

/* proxified syscalls */
{"now_init", &now_init},
@@ -236,6 +239,11 @@ void __artiq_terminate(struct artiq_exception *artiq_exn,
while(1);
}

void ksupport_abort() {
artiq_raise_from_c("InternalError", "abort() called; check device log for details",
0, 0, 0);
}

long long int now_init(void)
{
struct msg_base request;