3 <<__tz_lock>>, <<__tz_unlock>>---lock time zone global variables
12 void __tz_lock (void);
13 void __tz_unlock (void);
16 The <<tzset>> facility functions call these functions when they need to
17 ensure the values of global variables. The version of these routines
18 supplied in the library use the lock API defined in sys/lock.h. If multiple
19 threads of execution can call the time functions and give up scheduling in
20 the middle, then you you need to define your own versions of these functions
21 in order to safely lock the time zone variables during a call. If you do
22 not, the results of <<localtime>>, <<mktime>>, <<ctime>>, and <<strftime>>
25 The lock <<__tz_lock>> may not be called recursively; that is,
26 a call <<__tz_lock>> will always lock all subsequent <<__tz_lock>> calls
27 until the corresponding <<__tz_unlock>> call on the same thread is made.
34 #ifndef __SINGLE_THREAD__
35 __LOCK_INIT(static, __tz_mutex
);
41 #ifndef __SINGLE_THREAD__
42 __lock_acquire(__tz_mutex
);
49 #ifndef __SINGLE_THREAD__
50 __lock_release(__tz_mutex
);