From: Eric Bollengier Date: Sat, 24 Oct 2009 09:48:20 +0000 (+0200) Subject: force lock manger init X-Git-Tag: Release-7.0.0~2598^2~51 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=59f8cf14204fa8940451add20abbb0eb26e1214d;p=bacula%2Fbacula force lock manger init --- diff --git a/bacula/src/lib/lockmgr.c b/bacula/src/lib/lockmgr.c index d11017c43d..d035e24e8a 100644 --- a/bacula/src/lib/lockmgr.c +++ b/bacula/src/lib/lockmgr.c @@ -523,7 +523,7 @@ void *check_deadlock(void *) } /* This object is used when LMGR is not initialized */ -lmgr_dummy_thread_t dummy_lmgr; +static lmgr_dummy_thread_t dummy_lmgr; /* * Retrieve the lmgr_thread_t object from the stack @@ -721,11 +721,13 @@ int lmgr_thread_create(pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)(void*), void *arg) { + /* lmgr should be active (lmgr_init_thread() call in main()) */ + ASSERT(lmgr_is_active()); /* Will be freed by the child */ lmgr_thread_arg_t *a = (lmgr_thread_arg_t*) malloc(sizeof(lmgr_thread_arg_t)); a->start_routine = start_routine; a->arg = arg; - return pthread_create(thread, attr, lmgr_thread_launcher, a); + return pthread_create(thread, attr, lmgr_thread_launcher, a); } #else /* _USE_LOCKMGR */