62 #ifndef HAVE_WORKING_STDATOMIC
67 memset(counter, 0,
sizeof(*counter));
83 memset(counter, 0,
sizeof(*counter));
116 oldval = counter->val;
117 counter->val = newval;
124 subsys_threads_initialize(
void)
135 .initialize = subsys_threads_initialize,
void tor_mutex_init_nonrecursive(tor_mutex_t *m)
void tor_mutex_release(tor_mutex_t *m)
void tor_mutex_acquire(tor_mutex_t *m)
void tor_mutex_uninit(tor_mutex_t *m)
int tor_cond_init(tor_cond_t *cond)
void tor_threads_init(void)
void tor_cond_uninit(tor_cond_t *cond)
unsigned long tor_get_thread_id(void)
size_t atomic_counter_exchange(atomic_counter_t *counter, size_t newval)
void atomic_counter_init(atomic_counter_t *counter)
void atomic_counter_sub(atomic_counter_t *counter, size_t sub)
void atomic_counter_add(atomic_counter_t *counter, size_t add)
void tor_cond_free_(tor_cond_t *c)
static unsigned long main_thread_id
size_t atomic_counter_get(atomic_counter_t *counter)
void atomic_counter_destroy(atomic_counter_t *counter)
tor_cond_t * tor_cond_new(void)
void set_main_thread(void)
Types used to declare a subsystem.
#define SUBSYS_DECLARE_LOCATION()
Declare subsystem object for threads library.
Macros to manage assertions, fatal and non-fatal.