12 #ifndef TOR_COMPAT_MUTEX_H
13 #define TOR_COMPAT_MUTEX_H
19 #if defined(HAVE_PTHREAD_H) && !defined(_WIN32)
28 #define USE_WIN32_THREADS
29 #elif defined(HAVE_PTHREAD_H) && defined(HAVE_PTHREAD_CREATE)
32 #error "No threading system was found"
41 #if defined(USE_WIN32_THREADS)
51 #elif defined(USE_PTHREADS)
54 pthread_mutex_t mutex;
73 #define tor_mutex_free(m) FREE_AND_NULL(tor_mutex_t, tor_mutex_free_, (m))
tor_mutex_t * tor_mutex_new(void)
void tor_mutex_free_(tor_mutex_t *m)
void tor_mutex_init_nonrecursive(tor_mutex_t *m)
void tor_mutex_release(tor_mutex_t *m)
void tor_mutex_init(tor_mutex_t *m)
void tor_mutex_acquire(tor_mutex_t *m)
tor_mutex_t * tor_mutex_new_nonrecursive(void)
void tor_locking_init(void)
void tor_mutex_uninit(tor_mutex_t *m)
Headers for util_malloc.c.
Integer definitions used throughout Tor.