common.h 519 Bytes
Newer Older
1 2 3
#ifndef PRRT_COMMON_H
#define PRRT_COMMON_H

4 5
#include <sched.h>
#include <pthread.h>
Andreas Schmidt's avatar
Andreas Schmidt committed
6
#include "../proto/types/packet.h"
7
#include "../proto/vdmcode/block_code.h"
8

9 10
int print_buffer(const char *buf, const int length);
void print_gf(const gf *start, const int len);
Andreas Schmidt's avatar
Andreas Schmidt committed
11
int pin_thread_to_core(pthread_attr_t *ap, int core);
12

Andreas Schmidt's avatar
Andreas Schmidt committed
13
#define PERROR(fmt, args...) \
14
printf("PRRT ERROR (" __FILE__ ":%d)\n" fmt, __LINE__, ## args);
Andreas Schmidt's avatar
Andreas Schmidt committed
15

16 17 18
#define PNOTIMPLEMENTED(args) \
printf("NOT IMPLEMENTED: %s\n", args); \
exit(0)
Andreas Schmidt's avatar
Andreas Schmidt committed
19

20
#endif //PRRT_COMMON_H