summaryrefslogtreecommitdiff
path: root/lib/util/smb_threads.c
diff options
context:
space:
mode:
authorDerrell Lipman <derrell@dworkin.(none)>2009-05-10 22:40:20 -0400
committerDerrell Lipman <derrell@dworkin.(none)>2009-05-10 22:45:12 -0400
commit404327ad41c5f24f9ace5cad31509149d87197fd (patch)
tree58da4b89f1e154d457a9ac31b9c72f27f41f25ec /lib/util/smb_threads.c
parentdb69ebcbcebbd3882d2eee7df8de15c3dc9c309b (diff)
downloadsamba-404327ad41c5f24f9ace5cad31509149d87197fd.tar.gz
samba-404327ad41c5f24f9ace5cad31509149d87197fd.tar.bz2
samba-404327ad41c5f24f9ace5cad31509149d87197fd.zip
Panic upon mutex lock or unlock failure
- It's a serious error if we can't lock or unlock a mutex in smb_thread_once(). Panic instead of just displaying a DEBUG message. Derrell
Diffstat (limited to 'lib/util/smb_threads.c')
-rw-r--r--lib/util/smb_threads.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/util/smb_threads.c b/lib/util/smb_threads.c
index 8cddbf0176..132ad48784 100644
--- a/lib/util/smb_threads.c
+++ b/lib/util/smb_threads.c
@@ -111,7 +111,7 @@ void smb_thread_once(smb_thread_once_t *ponce, void (*init_fn)(void))
/* Lock our "once" mutex in order to test and initialize ponce */
if ((ret = SMB_THREAD_LOCK(once_mutex, SMB_THREAD_LOCK)) != 0) {
- DEBUG(0, ("error locking 'once': %d\n", ret));
+ smb_panic("error locking 'once'");
}
/* Store whether we're going to need to issue the function call */
@@ -134,7 +134,7 @@ void smb_thread_once(smb_thread_once_t *ponce, void (*init_fn)(void))
/* Unlock the mutex */
if ((ret = SMB_THREAD_LOCK(once_mutex, SMB_THREAD_UNLOCK)) != 0) {
- DEBUG(0, ("error unlocking 'once': %d\n", ret));
+ smb_panic("error unlocking 'once'");
}
/* Finally, if we need to call the user-provided function, ... */