summaryrefslogtreecommitdiff
path: root/lib/thread.h
diff options
context:
space:
mode:
authorAvneesh Sachdev <avneesh@opensourcerouting.org>2012-04-09 00:25:15 -0700
committerAvneesh Sachdev <avneesh@opensourcerouting.org>2012-04-09 00:25:15 -0700
commit3cf6c2b4e43f44a977d218c96c26250654ae333e (patch)
treee017cde2015fbf3ef6c250327428d7c6152aa8f7 /lib/thread.h
parent01d7ff0a2166a422c56bd26f04fc22832a9e690b (diff)
parente96b312150d8e376c1ef463793d1929eca3618d5 (diff)
Merge branch 'quagga' into google-bgp-multipath
Conflicts: bgpd/bgp_route.c
Diffstat (limited to 'lib/thread.h')
-rw-r--r--lib/thread.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/thread.h b/lib/thread.h
index 978aa6b0..dfc51e28 100644
--- a/lib/thread.h
+++ b/lib/thread.h
@@ -1,5 +1,6 @@
/* Thread management routine header.
* Copyright (C) 1998 Kunihiro Ishiguro
+ * Portions Copyright (c) 2008 Everton da Silva Marques <everton.marques@gmail.com>
*
* This file is part of GNU Zebra.
*
@@ -22,6 +23,8 @@
#ifndef _ZEBRA_THREAD_H
#define _ZEBRA_THREAD_H
+#include <zebra.h>
+
struct rusage_t
{
#ifdef HAVE_RUSAGE
@@ -137,6 +140,12 @@ enum quagga_clkid {
thread = thread_add_timer (master, func, arg, time); \
} while (0)
+#define THREAD_TIMER_MSEC_ON(master,thread,func,arg,time) \
+ do { \
+ if (! thread) \
+ thread = thread_add_timer_msec (master, func, arg, time); \
+ } while (0)
+
#define THREAD_OFF(thread) \
do { \
if (thread) \