MCPcopy Create free account
hub / github.com/eggert/tz / lock

Function lock

localtime.c:130–136  ·  view source on GitHub ↗

Get a lock. Return 0 on success, a positive errno value on failure, negative if known to be single-threaded so no lock is needed. */

Source from the content-addressed store, hash-verified

128/* Get a lock. Return 0 on success, a positive errno value on failure,
129 negative if known to be single-threaded so no lock is needed. */
130static int
131lock(void)
132{
133 if (!is_threaded())
134 return -1;
135 return dolock();
136}
137static void
138unlock(bool threaded)
139{

Callers 5

tzsetFunction · 0.85
localtime_tzsetFunction · 0.85
mktimeFunction · 0.85
time2posixFunction · 0.85
posix2timeFunction · 0.85

Calls 2

is_threadedFunction · 0.85
dolockFunction · 0.85

Tested by

no test coverage detected