diff options
author | Derrell Lipman <derrell@dworkin.(none)> | 2009-05-13 09:49:59 -0400 |
---|---|---|
committer | Derrell Lipman <derrell@dworkin.(none)> | 2009-05-13 09:50:17 -0400 |
commit | e03b9ae609a3ef856c483832332e307975a1bf0a (patch) | |
tree | d60aec946ceedc3bfe5205853a769b15a59953b1 /lib/util/talloc_stack.c | |
parent | 652251701df7dec1401eab9b1dbc7e3ac5c7e7ad (diff) | |
download | samba-e03b9ae609a3ef856c483832332e307975a1bf0a.tar.gz samba-e03b9ae609a3ef856c483832332e307975a1bf0a.tar.bz2 samba-e03b9ae609a3ef856c483832332e307975a1bf0a.zip |
Allow a parameter to smb_thread_once's initialization function
- This should make life easier for ourselves. We're no longer constrained to
the semantics of pthread_once, so let's allow passing a parameter to the
initialization function. Some of Samba's init functions return a
value. Although I haven't searched, I suspect that some of the init
functions require in input parameters. The parameter added here can be used
for input, output, or both, as necessary... or ignored, as is now done in
talloc_stackframe_init().
Derrell
Diffstat (limited to 'lib/util/talloc_stack.c')
-rw-r--r-- | lib/util/talloc_stack.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/util/talloc_stack.c b/lib/util/talloc_stack.c index 2ed18fa113..f1727ce469 100644 --- a/lib/util/talloc_stack.c +++ b/lib/util/talloc_stack.c @@ -58,7 +58,7 @@ static void *global_ts; /* Variable to ensure TLS value is only initialized once. */ static smb_thread_once_t ts_initialized = SMB_THREAD_ONCE_INIT; -static void talloc_stackframe_init(void) +static void talloc_stackframe_init(void * unused) { if (!global_tfp) { /* Non-thread safe init case. */ @@ -92,7 +92,7 @@ static struct talloc_stackframe *talloc_stackframe_create(void) ZERO_STRUCTP(ts); - SMB_THREAD_ONCE(&ts_initialized, talloc_stackframe_init); + SMB_THREAD_ONCE(&ts_initialized, talloc_stackframe_init, NULL); if (SMB_THREAD_SET_TLS(global_ts, ts)) { smb_panic("talloc_stackframe_init set_tls failed"); |