6 #ifndef ABTI_THREAD_HTABLE_H_INCLUDED
7 #define ABTI_THREAD_HTABLE_H_INCLUDED
11 #if defined(HAVE_LH_LOCK_H)
13 #elif defined(HAVE_CLH_H)
16 #define USE_PTHREAD_MUTEX
46 #if defined(HAVE_LH_LOCK_H)
48 #elif defined(HAVE_CLH_H)
50 #elif defined(USE_PTHREAD_MUTEX)
63 #if defined(HAVE_LH_LOCK_H)
64 #define ABTI_THREAD_HTABLE_LOCK(m) lh_acquire_lock(&m)
65 #define ABTI_THREAD_HTABLE_UNLOCK(m) lh_release_lock(&m)
66 #elif defined(HAVE_CLH_H)
67 #define ABTI_THREAD_HTABLE_LOCK(m) clh_acquire(&m)
68 #define ABTI_THREAD_HTABLE_UNLOCK(m) clh_release(&m)
69 #elif defined(USE_PTHREAD_MUTEX)
70 #define ABTI_THREAD_HTABLE_LOCK(m) pthread_mutex_lock(&m)
71 #define ABTI_THREAD_HTABLE_UNLOCK(m) pthread_mutex_unlock(&m)
73 #define ABTI_THREAD_HTABLE_LOCK(m) ABTI_spinlock_acquire(&m)
74 #define ABTI_THREAD_HTABLE_UNLOCK(m) ABTI_spinlock_release(&m)
112 p_htable->
h_list = p_node;
137 p_htable->
h_list = p_next;
148 p_htable->
l_list = p_node;
173 p_htable->
l_list = p_next;
static void ABTI_thread_htable_add_l_node(ABTI_thread_htable *p_htable, ABTI_thread_queue *p_node)
char pad3[64-sizeof(ABTI_thread_queue *)*4]
static void ABTI_thread_queue_acquire_low_mutex(ABTI_thread_queue *p_queue)
static void ABTD_atomic_release_store_uint32(ABTD_atomic_uint32 *ptr, uint32_t val)
struct ABTD_atomic_uint32 ABTD_atomic_uint32
static void ABTI_thread_htable_del_h_head(ABTI_thread_htable *p_htable)
static void ABTI_thread_queue_release_mutex(ABTI_thread_queue *p_queue)
ABTD_atomic_uint32 low_mutex
static void ABTI_thread_queue_acquire_mutex(ABTI_thread_queue *p_queue)
static uint32_t ABTD_atomic_acquire_load_uint32(const ABTD_atomic_uint32 *ptr)
char pad1[64-sizeof(ABTD_atomic_uint32)-sizeof(uint32_t)*3-sizeof(ABTI_thread *)*2]
static int ABTD_atomic_bool_cas_weak_uint32(ABTD_atomic_uint32 *ptr, uint32_t oldv, uint32_t newv)
static void ABTI_thread_htable_add_h_node(ABTI_thread_htable *p_htable, ABTI_thread_queue *p_node)
ABTI_thread_queue * queue
ABTI_thread_queue * p_h_next
static void ABTI_thread_queue_release_low_mutex(ABTI_thread_queue *p_queue)
ABTI_thread_queue * p_l_next
ABTI_thread_queue * h_list
char pad2[64-sizeof(ABTD_atomic_uint32)-sizeof(uint32_t)-sizeof(ABTI_thread *)*2]
ABTI_thread_queue * l_list
ABTI_thread_queue * p_l_prev
ABTD_atomic_uint32 num_elems
static void ABTI_thread_htable_del_l_head(ABTI_thread_htable *p_htable)
ABTI_thread_queue * p_h_prev