6 #ifndef ABTI_YTHREAD_HTABLE_H_INCLUDED
7 #define ABTI_YTHREAD_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_ythread_queue_acquire_mutex(ABTI_ythread_queue *p_queue)
char pad2[64-sizeof(ABTD_atomic_uint32)-sizeof(uint32_t)-sizeof(ABTI_ythread *)*2]
ABTI_ythread_queue * p_l_prev
static void ABTI_ythread_queue_acquire_low_mutex(ABTI_ythread_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_ythread_queue_release_mutex(ABTI_ythread_queue *p_queue)
ABTD_atomic_uint32 num_elems
static void ABTI_ythread_htable_add_h_node(ABTI_ythread_htable *p_htable, ABTI_ythread_queue *p_node)
char pad1[64-sizeof(ABTD_atomic_uint32)-sizeof(uint32_t)*3-sizeof(ABTI_ythread *)*2]
ABTI_ythread_queue * h_list
static uint32_t ABTD_atomic_acquire_load_uint32(const ABTD_atomic_uint32 *ptr)
static int ABTD_atomic_bool_cas_weak_uint32(ABTD_atomic_uint32 *ptr, uint32_t oldv, uint32_t newv)
ABTI_ythread_queue * l_list
ABTI_ythread_queue * queue
ABTD_atomic_uint32 low_mutex
static void ABTI_ythread_htable_del_l_head(ABTI_ythread_htable *p_htable)
ABTI_ythread_queue * p_l_next
static void ABTI_ythread_queue_release_low_mutex(ABTI_ythread_queue *p_queue)
ABTI_ythread_queue * p_h_next
ABTI_ythread_queue * p_h_prev
static void ABTI_ythread_htable_del_h_head(ABTI_ythread_htable *p_htable)
char pad3[64-sizeof(ABTI_ythread_queue *)*4]
static void ABTI_ythread_htable_add_l_node(ABTI_ythread_htable *p_htable, ABTI_ythread_queue *p_node)