forked from M-Labs/artiq
1
0
Fork 0
artiq/soc/runtime/exceptions.h

27 lines
720 B
C
Raw Normal View History

#ifndef __EXCEPTIONS_H
#define __EXCEPTIONS_H
2014-09-22 13:18:48 +08:00
enum {
2014-12-20 21:33:22 +08:00
EID_NONE = 0,
EID_INTERNAL_ERROR = 1,
2014-12-20 21:33:22 +08:00
EID_RPC_EXCEPTION = 2,
EID_RTIO_UNDERFLOW = 3,
EID_RTIO_SEQUENCE_ERROR = 4,
2015-07-29 19:43:35 +08:00
EID_RTIO_COLLISION_ERROR = 5,
EID_RTIO_OVERFLOW = 6,
EID_DDS_BATCH_ERROR = 7
};
int exception_setjmp(void *jb) __attribute__((returns_twice));
void exception_longjmp(void *jb) __attribute__((noreturn));
2014-09-22 13:18:48 +08:00
void *exception_push(void);
void exception_pop(int levels);
int exception_getid(long long int *eparams);
void exception_raise(int id) __attribute__((noreturn));
void exception_raise_params(int id,
long long int p0, long long int p1,
long long int p2) __attribute__((noreturn));
#endif /* __EXCEPTIONS_H */