CNDP  22.08.0
cthread Struct Reference

#include <cthread_int.h>

Public Member Functions

 CNE_ATOMIC (uint_least64_t) join
 
 STAILQ_ENTRY (cthread) next
 

Data Fields

struct ctx ctx
 
int cthread_id
 
uint64_t state
 
void * private_data
 
void * stack
 
size_t stack_size
 
size_t last_stack_size
 
cthread_func_t fun
 
void * arg
 
void * per_cthread_data
 
cthread_exit_func exit_handler
 
uint64_t birth
 
struct cthread_queue * pending_wr_queue
 
struct cthreaddt_join
 
void ** dt_exit_ptr
 
struct cthread_schedsched
 
struct queue_node * qnode
 
struct cne_timer tim
 
struct cthread_tls * tls
 
struct cthread_stackstack_container
 
struct cthread_cond * cond
 
struct cthread_sema * sema
 
char name [CTHREAD_NAME_SIZE]
 

Detailed Description

Definition of an cthread

Examples
examples/phil/main.c.

Definition at line 159 of file cthread_int.h.

Member Function Documentation

◆ CNE_ATOMIC()

CNE_ATOMIC ( uint_least64_t  )

state for joining

◆ STAILQ_ENTRY()

STAILQ_ENTRY ( cthread  )

Next thread in list

Field Documentation

◆ ctx

struct ctx ctx

cpu context

Definition at line 153 of file cthread_int.h.

◆ cthread_id

int cthread_id

thread id value

Definition at line 161 of file cthread_int.h.

◆ state

uint64_t state

current cthread state

Definition at line 162 of file cthread_int.h.

◆ private_data

void* private_data

Thread private data set by thread

Definition at line 163 of file cthread_int.h.

◆ stack

void* stack

ptr to actual stack

Definition at line 164 of file cthread_int.h.

◆ stack_size

size_t stack_size

current stack_size

Definition at line 165 of file cthread_int.h.

◆ last_stack_size

size_t last_stack_size

last yield stack_size

Definition at line 166 of file cthread_int.h.

◆ fun

func ctx is running

Definition at line 167 of file cthread_int.h.

◆ arg

void* arg

func args passed to func

Definition at line 168 of file cthread_int.h.

◆ per_cthread_data

void* per_cthread_data

per cthread user data

Definition at line 169 of file cthread_int.h.

◆ exit_handler

cthread_exit_func exit_handler

called when thread exits

Definition at line 170 of file cthread_int.h.

◆ birth

uint64_t birth

time cthread was born

Definition at line 171 of file cthread_int.h.

◆ pending_wr_queue

struct cthread_queue* pending_wr_queue

deferred queue to write

Definition at line 172 of file cthread_int.h.

◆ dt_join

struct cthread* dt_join

cthread to join on

Definition at line 173 of file cthread_int.h.

◆ dt_exit_ptr

void** dt_exit_ptr

exit ptr for cthread_join

Definition at line 175 of file cthread_int.h.

◆ sched

struct cthread_sched* sched

thread was created here

Definition at line 176 of file cthread_int.h.

◆ qnode

struct queue_node* qnode

node when in a queue

Definition at line 177 of file cthread_int.h.

◆ tim

struct cne_timer tim

sleep timer

Definition at line 177 of file cthread_int.h.

◆ tls

struct cthread_tls* tls

keys in use by the thread

Definition at line 179 of file cthread_int.h.

◆ stack_container

struct cthread_stack* stack_container

stack container pointer

Definition at line 180 of file cthread_int.h.

◆ cond

struct cthread_cond* cond

Condition variable ct is waiting on

Definition at line 181 of file cthread_int.h.

◆ sema

struct cthread_sema* sema

Semaphore ct is waiting on

Definition at line 182 of file cthread_int.h.

◆ name

char name[CTHREAD_NAME_SIZE]

thread name

Definition at line 183 of file cthread_int.h.


The documentation for this struct was generated from the following file: