compat_mutex.c File Reference
#include "lib/lock/compat_mutex.h"
#include "lib/malloc/malloc.h"

Go to the source code of this file.


tor_mutex_ttor_mutex_new (void)
tor_mutex_ttor_mutex_new_nonrecursive (void)
void tor_mutex_free_ (tor_mutex_t *m)

Detailed Description

Portable wrapper for platform mutex implementations.

Definition in file compat_mutex.c.

Function Documentation

◆ tor_mutex_free_()

void tor_mutex_free_ ( tor_mutex_t m)

Release all storage and system resources held by m.

Definition at line 34 of file compat_mutex.c.

References tor_free, and tor_mutex_uninit().

◆ tor_mutex_new()

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_new_nonrecursive()

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.