1 2 3 4 5 6 7 8 9 10 11 12 13
#include <camellia/intr.h> #include <stdlib.h> static void intr_null(void) { } extern void (*volatile _intr)(void); void intr_set(void (*fn)(void)) { _intr = fn ? fn : intr_null; } void intr_default(void) { exit(-1); }