diff options
author | paulo <paul@bayleaf.org.uk> | 2009-12-16 15:46:12 +0000 |
---|---|---|
committer | paulo <paul@bayleaf.org.uk> | 2009-12-16 15:46:12 +0000 |
commit | f5e3efd6013ee104d3310b5910607034c552e4db (patch) | |
tree | 1320e0ae2a47a267b5521adf90edfdc912d51281 /lib/qlib_init.c | |
parent | b69a458160a9ab354fb9350f605bd36310786304 (diff) | |
download | quagga-f5e3efd6013ee104d3310b5910607034c552e4db.tar.bz2 quagga-f5e3efd6013ee104d3310b5910607034c552e4db.tar.xz |
Fix race condition when threads start. Make memory stats thread safe
Run memory commands in cli thread.
Diffstat (limited to 'lib/qlib_init.c')
-rw-r--r-- | lib/qlib_init.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/qlib_init.c b/lib/qlib_init.c index 83ae0fe7..8f46c610 100644 --- a/lib/qlib_init.c +++ b/lib/qlib_init.c @@ -19,7 +19,10 @@ * Boston, MA 02111-1307, USA. */ +#include "qlib_init.h" #include "zassert.h" +#include "memory.h" +#include "qpthreads.h" /*============================================================================== * Quagga Library Initialise/Closedown @@ -61,19 +64,20 @@ void qlib_init_first_stage(void) { - ; } void qlib_init_second_stage(int pthreads) { qpt_set_qpthreads_enabled(pthreads); + memory_init_r(); } void qexit(int exit_code) { + memory_finish(); exit (exit_code); } |