chelper: Add compiler.h header

Add the compiler.h header file to the chelper code - this adds a
number of useful gcc definitions.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor
2018-06-05 21:25:37 -04:00
parent bedbfceafc
commit 189ebb4c7d
3 changed files with 49 additions and 7 deletions

View File

@@ -1,9 +1,6 @@
#ifndef PYHELPER_H
#define PYHELPER_H
#define likely(x) __builtin_expect(!!(x), 1)
#define unlikely(x) __builtin_expect(!!(x), 0)
double get_monotonic(void);
struct timespec fill_time(double time);
void set_python_logging_callback(void (*func)(const char *));