You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
679 B
16 lines
679 B
#pragma once
|
|
|
|
#include <assert.h>
|
|
#include <pthread.h>
|
|
#include <sched.h>
|
|
#include <stdio.h>
|
|
|
|
#define panic(fmt, ...) \
|
|
{ \
|
|
fprintf(stderr, "C: %02d, T: 0x%lx, F: %s> PANIC! \n\t" fmt "\n", sched_getcpu(), pthread_self(), \
|
|
__func__, ##__VA_ARGS__); \
|
|
exit(EXIT_FAILURE); \
|
|
}
|
|
|
|
#define panic_err() panic("%s", strerror(errno));
|