artiq/soc/runtime/artiq_personality.h

44 lines
856 B
C
Raw Normal View History

2015-07-27 10:46:43 +08:00
#ifndef __ARTIQ_PERSONALITY_H
#define __ARTIQ_PERSONALITY_H
#include <stdint.h>
struct artiq_exception {
union {
2015-07-27 14:10:20 +08:00
uintptr_t typeinfo;
2015-07-27 10:46:43 +08:00
const char *name;
};
const char *file;
int32_t line;
int32_t column;
const char *message;
int64_t param[3];
};
struct artiq_backtrace_item {
intptr_t function;
intptr_t offset;
};
2015-07-27 10:46:43 +08:00
#ifdef __cplusplus
extern "C" {
#endif
/* Provided by the runtime */
void __artiq_raise(struct artiq_exception *artiq_exn)
__attribute__((noreturn));
void __artiq_reraise()
2015-07-27 10:46:43 +08:00
__attribute__((noreturn));
/* Called by the runtime */
void __artiq_terminate(struct artiq_exception *artiq_exn,
struct artiq_backtrace_item *backtrace,
size_t backtrace_size)
__attribute__((noreturn));
2015-07-27 10:46:43 +08:00
#ifdef __cplusplus
}
#endif
#endif /* __ARTIQ_PERSONALITY_H */