summaryrefslogtreecommitdiff
path: root/lib/util/smb_threads_internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/util/smb_threads_internal.h')
-rw-r--r--lib/util/smb_threads_internal.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/util/smb_threads_internal.h b/lib/util/smb_threads_internal.h
index 58c6fe3f99..b7e862af72 100644
--- a/lib/util/smb_threads_internal.h
+++ b/lib/util/smb_threads_internal.h
@@ -33,13 +33,16 @@
#define SMB_THREAD_LOCK(plock, type) \
(global_tfp ? global_tfp->lock_mutex((plock), (type), __location__) : 0)
-#define SMB_THREAD_CREATE_TLS_ONCE(keyname, key) \
- (global_tfp ? global_tfp->create_tls_once((keyname), &(key), __location__) : 0)
+#define SMB_THREAD_ONCE(ponce, init_fn) \
+ (global_tfp ? global_tfp->smb_thread_once((ponce), (init_fn)) : ((init_fn()), 0))
-#define SMB_THREAD_DESTROY_TLS_ONCE(key) \
+#define SMB_THREAD_CREATE_TLS(keyname, key) \
+ (global_tfp ? global_tfp->create_tls((keyname), &(key), __location__) : 0)
+
+#define SMB_THREAD_DESTROY_TLS(key) \
do { \
if (global_tfp) { \
- global_tfp->destroy_tls_once(&(key), __location__); \
+ global_tfp->destroy_tls(&(key), __location__); \
}; \
} while (0)