diff options
author | Chris Hall <GMCH@hestia.halldom.com> | 2010-01-05 11:01:49 +0000 |
---|---|---|
committer | Chris Hall <GMCH@hestia.halldom.com> | 2010-01-05 11:01:49 +0000 |
commit | fc286f3e879afd0b5b6c2b889132622739138d66 (patch) | |
tree | cc423a21595af618006126a1a66bd7ef0ede305f /lib/qpthreads.h | |
parent | 6746ef8cd683a5e0afa57a5fc90a28f533be68be (diff) | |
download | quagga-fc286f3e879afd0b5b6c2b889132622739138d66.tar.bz2 quagga-fc286f3e879afd0b5b6c2b889132622739138d66.tar.xz |
Add qpthreads_thread_created to lib/qpthreads
Flag indicates that at least one thread has been created.
(To be used to ensure no surprises when daemonising !)
Diffstat (limited to 'lib/qpthreads.h')
-rw-r--r-- | lib/qpthreads.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/qpthreads.h b/lib/qpthreads.h index aaf8e5dd..4d71e12d 100644 --- a/lib/qpthreads.h +++ b/lib/qpthreads.h @@ -73,8 +73,11 @@ * qpthreads_enabled_freeze -- to test and freeze unset if not yet enabled */ -#define qpthreads_enabled ((const int)qpthreads_enabled_flag) -#define qpthreads_enabled_freeze qpt_freeze_qpthreads_enabled() +#define qpthreads_enabled ((const uint8_t)qpthreads_enabled_flag) +#define qpthreads_enabled_freeze qpt_freeze_qpthreads_enabled() + +#define qpthreads_thread_created ((const uint8_t) \ + qpthreads_thread_created_flag) /*============================================================================== * Data types @@ -129,7 +132,8 @@ qpt_thread_join(qpt_thread_t thread_id) ; /*============================================================================== * qpthreads_enabled support -- NOT FOR PUBLIC CONSUMPTION ! */ -private int qpthreads_enabled_flag ; /* DO NOT WRITE TO THIS PLEASE */ +private uint8_t qpthreads_enabled_flag ; /* DO NOT TOUCH THIS PLEASE */ +private uint8_t qpthreads_thread_created_flag ; /* DO NOT TOUCH THIS PLEASE */ private int qpt_set_qpthreads_enabled(int how) ; /* qpthreads_enabled := how */ |