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.
17 lines
699 B
17 lines
699 B
#pragma once
|
|
|
|
#include <assert.h>
|
|
#include <pthread.h>
|
|
#include <sched.h>
|
|
#include <stdio.h>
|
|
#include <stdlib.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));
|