Tor
0.4.7.0-alpha-dev
|
Portable wrapper for platform mutex implementations. More...
Go to the source code of this file.
Functions | |
tor_mutex_t * | tor_mutex_new (void) |
tor_mutex_t * | tor_mutex_new_nonrecursive (void) |
void | tor_mutex_free_ (tor_mutex_t *m) |
Portable wrapper for platform mutex implementations.
Definition in file compat_mutex.c.
void tor_mutex_free_ | ( | tor_mutex_t * | m | ) |
Release all storage and system resources held by m.
Destroying a locked mutex is undefined behaviour. Global mutexes may be locked when they are passed to this function, because multiple threads can still access them. So we can either:
Definition at line 42 of file compat_mutex.c.
tor_mutex_t* tor_mutex_new | ( | void | ) |
Return a newly allocated, ready-for-use mutex.
Definition at line 17 of file compat_mutex.c.
Referenced by tor_gmtime_r_msg(), and tor_localtime_r_msg().
tor_mutex_t* tor_mutex_new_nonrecursive | ( | void | ) |
Return a newly allocated, ready-for-use mutex. This one might be non-recursive, if that's faster.
Definition at line 26 of file compat_mutex.c.