2014-09-21 23:32:14 +08:00
|
|
|
#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,
|
2015-04-05 22:04:50 +08:00
|
|
|
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,
|
|
|
|
EID_RTIO_OVERFLOW = 5,
|
2014-09-21 23:32:14 +08:00
|
|
|
};
|
|
|
|
|
2014-09-23 22:09:08 +08:00
|
|
|
int exception_setjmp(void *jb) __attribute__((returns_twice));
|
2014-09-24 00:00:10 +08:00
|
|
|
void exception_longjmp(void *jb) __attribute__((noreturn));
|
2014-09-23 22:09:08 +08:00
|
|
|
|
2014-09-22 13:18:48 +08:00
|
|
|
void *exception_push(void);
|
2014-09-23 16:22:32 +08:00
|
|
|
void exception_pop(int levels);
|
2015-04-05 22:04:50 +08:00
|
|
|
int exception_getid(long long int *eparams);
|
2014-09-21 23:32:14 +08:00
|
|
|
void exception_raise(int id) __attribute__((noreturn));
|
2015-03-13 21:55:18 +08:00
|
|
|
void exception_raise_params(int id,
|
|
|
|
long long int p0, long long int p1,
|
|
|
|
long long int p2) __attribute__((noreturn));
|
2014-09-21 23:32:14 +08:00
|
|
|
|
|
|
|
#endif /* __EXCEPTIONS_H */
|