44 if (
notecmp(note,
"divbyzero") == 0)
48 else if (
notecmp(note,
"illegal") == 0)
52 else if (
notecmp(note,
"interrupt") == 0)
56 else if (
notecmp(note,
"pagefault") == 0)
60 else if (
notecmp(note,
"terminate") == 0)
72 _exit(
"notify failed");
104 if (sig <= 0 || sig >=
SIGMAX)
115 if (sig <= 0 || sig >=
SIGMAX)
126 if (sig <= 0 || sig >=
SIGMAX)
void(* sighandler_t)(int)
#define F(format,...)
Format string macro.
uint64_t(* atnotify_func_t)(char *note)
User space atnotify() handler function type.
int64_t notecmp(const char *note, const char *word)
Helper for comparing note strings.
uint64_t notify(note_func_t handler)
System call that sets the handler to be called when a note is received.
_NORETURN void _exit(const char *status)
System call that handles pending notes for the current thread.
_NORETURN void noted(void)
System call that notifies the kernel that the current note has been handled.
#define NULL
Pointer error value.
#define ERR
Integer error value.
uint64_t _note_handler_add(atnotify_func_t func)
void _note_handler_remove(atnotify_func_t func)
static _NORETURN void _note_kernel_handler(char *note)
sighandler_t _signal_handler_add(int sig, sighandler_t func)
void _signal_handler_remove(int sig, sighandler_t func)
static void _signal_invoke(int sig, const char *note)
int _signal_raise(int sig)
#define _NOTE_MAX_HANDLERS
#define atomic_compare_exchange_strong(object, expected, desired)
#define atomic_exchange(object, desired)
#define atomic_load(object)
#define ATOMIC_VAR_INIT(value)