summaryrefslogtreecommitdiff
path: root/lib/birdlib.h
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2019-07-24 15:38:32 +0200
committerOndrej Zajicek (work) <santiago@crfreenet.org>2019-07-24 15:38:32 +0200
commitcec40a74679821513e627f93b924067a404f6475 (patch)
tree793bbe5b326e7008e4657cf11b2937cafbe3d922 /lib/birdlib.h
parent18f70a6229f586d5e4f387075be42d7a1ef5d269 (diff)
parent8263690e754a83b8f3c58bd0080a1628d6cba556 (diff)
Merge remote-tracking branch 'origin/mq-filter-stack'
Diffstat (limited to 'lib/birdlib.h')
-rw-r--r--lib/birdlib.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/birdlib.h b/lib/birdlib.h
index 7cd78032..30ea433c 100644
--- a/lib/birdlib.h
+++ b/lib/birdlib.h
@@ -73,6 +73,10 @@ static inline int u64_cmp(u64 i1, u64 i2)
#define UNUSED __attribute__((unused))
#define PACKED __attribute__((packed))
+#ifndef HAVE_THREAD_LOCAL
+#define _Thread_local
+#endif
+
/* Microsecond time */
typedef s64 btime;
@@ -164,6 +168,15 @@ void debug(const char *msg, ...); /* Printf to debug output */
#define ASSERT(x) do { if (!(x)) log(L_BUG "Assertion '%s' failed at %s:%d", #x, __FILE__, __LINE__); } while(0)
#endif
+#ifdef DEBUGGING
+asm(
+ ".pushsection \".debug_gdb_scripts\", \"MS\",@progbits,1\n"
+ ".byte 1\n" /* Python */
+ ".asciz \"bird-gdb.py\"\n"
+ ".popsection\n"
+ );
+#endif
+
/* Pseudorandom numbers */
u32 random_u32(void);