]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix new killsafe code
authorEric Bollengier <eric@eb.homelinux.org>
Thu, 24 Jun 2010 14:50:32 +0000 (16:50 +0200)
committerEric Bollengier <eric@eb.homelinux.org>
Mon, 2 Aug 2010 14:53:56 +0000 (16:53 +0200)
bacula/src/lib/lockmgr.c
bacula/src/lib/lockmgr.h

index 5e27b224a0ba46d274710ca642ee8241794611bf..e7dda50c07f9fe53326c90c842e47aae8c18279e 100644 (file)
@@ -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);
 }
 
index a7f26e85f424a1d0efe9f05e04b8e087a5427f5f..64beaa35e71f5a1532df51bb1d66ad8d9612eb6e 100644 (file)
@@ -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 */