summaryrefslogtreecommitdiffstats
path: root/lib/qpthreads.h
diff options
context:
space:
mode:
authorChris Hall (GMCH) <chris.hall@highwayman.com>2009-12-03 20:06:55 +0000
committerChris Hall (GMCH) <chris.hall@highwayman.com>2009-12-03 20:06:55 +0000
commit606acaa3264d6868ad06d1874137c6aa81ad14e5 (patch)
tree8f781310aa3e3cc99ed018419973bcf60a6b3d90 /lib/qpthreads.h
parent9cd302528c2db501744694d8572cb4e658bf4259 (diff)
downloadquagga-606acaa3264d6868ad06d1874137c6aa81ad14e5.tar.bz2
quagga-606acaa3264d6868ad06d1874137c6aa81ad14e5.tar.xz
Add signal functions to lib/qpthreads.c
Adding qpt_thread_sigmask() and qpt_thread_signal().
Diffstat (limited to 'lib/qpthreads.h')
-rw-r--r--lib/qpthreads.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/qpthreads.h b/lib/qpthreads.h
index 189eabc6..d84b2c5c 100644
--- a/lib/qpthreads.h
+++ b/lib/qpthreads.h
@@ -180,6 +180,9 @@ qpt_mutex_unlock(qpt_mutex_t* mx) ; /* do nothing if mx == NULL */
* * CLOCK_MONOTONIC if available
* * CLOCK_REALTIME otherwise -- this is the standard default.
*
+ * QPT_COND_CLOCK_MONOTONIC is set if CLOCK_MONOTONIC is used (and must be set
+ * if QPT_COND_CLOCK_ID is set elsewhere to something that is monotonic).
+ *
* NB: qpt_cond_get_timeout_time uses QPT_COND_CLOCK_ID.
*
* If a specific clock is required, it can be set... but the user of the
@@ -192,8 +195,10 @@ qpt_mutex_unlock(qpt_mutex_t* mx) ; /* do nothing if mx == NULL */
#ifndef QPT_COND_CLOCK_ID
# ifndef HAVE_CLOCK_MONOTONIC
# define QPT_COND_CLOCK_ID CLOCK_REALTIME
+# undef QPT_COND_CLOCK_MONOTONIC
# else
# define QPT_COND_CLOCK_ID CLOCK_MONOTONIC
+# define QPT_COND_CLOCK_MONOTONIC 1
# endif
#endif
@@ -390,4 +395,13 @@ qpt_cond_broadcast(qpt_cond_t* cv)
#endif
} ;
+/*==============================================================================
+ * Signal Handling.
+ */
+void
+qpt_thread_sigmask(int how, const sigset_t* set, sigset_t* oset) ;
+
+void
+qpt_thread_signal(qpt_thread_t thread, int signum) ;
+
#endif /* _ZEBRA_QPTHREADS_H */