From 8e06e945b6b03db825862f2f057f0dfe13ade3a2 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 14 Apr 2009 15:19:39 -0700 Subject: Ensure a tls key is only generated once - wrap create & destroy in a mutex. Change the function names to add _once to the tls_create & tls_destroy to make this obvious. Jeremy. --- lib/util/talloc_stack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/util/talloc_stack.c') diff --git a/lib/util/talloc_stack.c b/lib/util/talloc_stack.c index a9b6e033ce..f572dd6c77 100644 --- a/lib/util/talloc_stack.c +++ b/lib/util/talloc_stack.c @@ -74,7 +74,7 @@ static struct talloc_stackframe *talloc_stackframe_init(void) ZERO_STRUCTP(ts); - if (SMB_THREAD_CREATE_TLS("talloc_stackframe", global_ts)) { + if (SMB_THREAD_CREATE_TLS_ONCE("talloc_stackframe", global_ts)) { smb_panic("talloc_stackframe_init create_tls failed"); } -- cgit