BarryServer : Git

All the code for all my projects
// BarryServer : Git / Nucleus / blob / 57c37224fcb74856e64ac9e2421bff651e95e84a / include / nucleus / panic.h

// Related

Nucleus

Barry debug printf system call 57c3722 (3 years, 2 months ago)
#ifndef _NUCLEUS_PANIC_H
#define _NUCLEUS_PANIC_H

int sprintf(char *buf, char *fmt, ...);
void kprintf(char *fmt, ...);
void dbgprintf(char *msg);
_Noreturn void panic(char *fmt, ...);

#define ASSERT(c) ({ \
	if (__builtin_expect(!(c),0)) \
		panic("Assertion failed (%s:%d): %s", \
		      __FILE__, __LINE__, #c); \
	c; \
})

#endif