From: Eric Bollengier Date: Thu, 24 Jun 2010 14:50:32 +0000 (+0200) Subject: Fix new killsafe code X-Git-Tag: Release-5.2.1~1239 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=667171a518a200a38125b802e193e4064d7a234f;p=bacula%2Fbacula Fix new killsafe code --- diff --git a/bacula/src/lib/lockmgr.c b/bacula/src/lib/lockmgr.c index 5e27b224a0..e7dda50c07 100644 --- a/bacula/src/lib/lockmgr.c +++ b/bacula/src/lib/lockmgr.c @@ -740,7 +740,8 @@ int bthread_kill(pthread_t thread, int sig, * so, we can stop here. */ ASSERT(thread_found_in_process == true); - + + Dmsg3(100, "%s:%d send kill to existing thread %p\n", file, line, thread); return pthread_kill(thread, sig); } diff --git a/bacula/src/lib/lockmgr.h b/bacula/src/lib/lockmgr.h index a7f26e85f4..64beaa35e7 100644 --- a/bacula/src/lib/lockmgr.h +++ b/bacula/src/lib/lockmgr.h @@ -164,10 +164,6 @@ int lmgr_thread_create(pthread_t *thread, int bthread_kill(pthread_t thread, int sig, const char *file="*unknown*", int line=0); -#ifdef USE_LOCKMGR_SAFEKILL -# define pthread_kill(a,b) bthread_kill((a),(b), __FILE__, __LINE__) -#endif - #define BTHREAD_MUTEX_NO_PRIORITY {PTHREAD_MUTEX_INITIALIZER, 0} #define BTHREAD_MUTEX_INITIALIZER BTHREAD_MUTEX_NO_PRIORITY @@ -198,6 +194,10 @@ int bthread_kill(pthread_t thread, int sig, # define pthread_mutex_unlock(x) bthread_mutex_unlock(x) # define pthread_cond_wait(x,y) bthread_cond_wait(x,y) # define pthread_cond_timedwait(x,y,z) bthread_cond_timedwait(x,y,z) + +# ifdef USE_LOCKMGR_SAFEKILL +# define pthread_kill(a,b) bthread_kill((a),(b), __FILE__, __LINE__) +# endif #endif #else /* _USE_LOCKMGR */