diff options
author | Andrew Bartlett <abartlet@samba.org> | 2009-04-20 16:53:02 +0200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2009-04-20 16:53:02 +0200 |
commit | 6c9caed48187a0d18becf59ab636af44cbe521b0 (patch) | |
tree | c47170169077be6f8ae60aed739803ab4ba861b7 /lib/util/smb_threads_internal.h | |
parent | 53765c81f726a8c056cc4e57004592dd489975c9 (diff) | |
parent | 31120c9eacafd93e0f2c6b0f906af21adadd318a (diff) | |
download | samba-6c9caed48187a0d18becf59ab636af44cbe521b0.tar.gz samba-6c9caed48187a0d18becf59ab636af44cbe521b0.tar.xz samba-6c9caed48187a0d18becf59ab636af44cbe521b0.zip |
Merge commit 'origin/master' into libcli-auth-merge-without-netlogond
Diffstat (limited to 'lib/util/smb_threads_internal.h')
-rw-r--r-- | lib/util/smb_threads_internal.h | 11 |
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) |