PatchworkOS  19e446b
A non-POSIX operating system.
Loading...
Searching...
No Matches
abort_handler_s.c
Go to the documentation of this file.
2#include <stdio.h>
3#include <stdlib.h>
4#include <sys/defs.h>
5
6void abort_handler_s(const char* _RESTRICT msg, void* _RESTRICT ptr, errno_t err)
7{
8#ifdef _KERNEL_
9 UNUSED(ptr);
10 UNUSED(err);
11 UNUSED(msg);
12#else
13 UNUSED(ptr);
14 UNUSED(err);
15 fprintf(stderr, "abort handler called:\n%s\n", msg);
16#endif
17 abort();
18}
#define _RESTRICT
Definition config.h:17
void abort_handler_s(const char *_RESTRICT msg, void *_RESTRICT ptr, errno_t err)
int errno_t
Definition errno_t.h:4
#define UNUSED(x)
Mark a variable as unused.
Definition defs.h:96
FILE * stderr
Definition std_streams.c:19
_PUBLIC int fprintf(FILE *_RESTRICT stream, const char *_RESTRICT format,...)
Definition fprintf.c:3
_PUBLIC _NORETURN void abort(void)
Definition abort.c:9