32 #ifndef _CTHREAD_INT_H
33 #define _CTHREAD_INT_H
35 #include <sys/queue.h>
59 #define BIT(x) (1ULL << (x))
61 #define POSIX_ERRNO(x) (x)
63 #define CTHREAD_NAME_SIZE 64
66 #define THIS_SCHED CNE_PER_THREAD(this_sched)
67 #define THIS_CTHREAD CNE_PER_THREAD(this_sched)->current_cthread
111 CT_STATE_COND_WAITING,
112 CT_STATE_MUTEX_WAITING,
118 #define CLEAR_STATE_BITS \
119 (BIT(CT_STATE_COND_WAITING) | BIT(CT_STATE_MUTEX_WAITING) | BIT(CT_STATE_SLEEPING))
122 #define CTHREAD_STATES { \
143 CT_JOIN_EXIT_VAL_SET,
144 CT_JOIN_EXIT_VAL_READ
153 uint8_t stack_start[0];
194 void _cthread_wait(
void);
202 void _cthread_mutex_wait(
void);
#define __cne_cache_aligned
#define CNE_DECLARE_PER_THREAD(type, name)
void(* cthread_func_t)(void *)
struct cthread_objcache * tls_cache
struct cthread_objcache * once_cache
uint64_t nb_blocked_threads
struct cthread_queue * ready
struct cthread_objcache * cthread_cache
STAILQ_ENTRY(cthread_sched) next
struct cthread * current_cthread
STAILQ_HEAD(, cthread) threads
struct key_pool * key_pool
struct cthread_queue * pready
CNE_ATOMIC(uint_least32_t) thread_count
struct cthread_objcache * barr_cache
struct cthread_objcache * cond_cache
struct cthread_objcache * stack_cache
struct cthread_objcache * mutex_cache
struct cthread_objcache * sema_cache
struct qnode_pool * qnode_pool
cne_spinlock_recursive_t lock
struct cthread_objcache * per_cthread_cache
CNE_ATOMIC(uint_least64_t) join
char name[CTHREAD_NAME_SIZE]
struct cthread_queue * pending_wr_queue
struct cthread_sema * sema
struct cthread_stack * stack_container
struct queue_node * qnode
struct cthread_sched * sched
STAILQ_ENTRY(cthread) next
struct cthread_cond * cond
cthread_exit_func exit_handler