CNDP  22.08.0
cthread_sched Struct Reference

#include <cthread_int.h>

Public Member Functions

 STAILQ_ENTRY (cthread_sched) next
 
 STAILQ_HEAD (, cthread) threads
 
 CNE_ATOMIC (uint_least32_t) thread_count
 

Data Fields

struct cthreadcurrent_cthread
 
cne_spinlock_recursive_t lock
 
int sched_id
 
int run_flag
 
struct ctx ctx
 
uint64_t birth
 
u_id_tuid_pool
 
uint64_t nb_blocked_threads
 
struct cthread_queue * ready
 
struct cthread_queue * pready
 
struct cthread_objcache * cthread_cache
 
struct cthread_objcache * stack_cache
 
struct cthread_objcache * per_cthread_cache
 
struct cthread_objcache * tls_cache
 
struct cthread_objcache * cond_cache
 
struct cthread_objcache * sema_cache
 
struct cthread_objcache * barr_cache
 
struct cthread_objcache * mutex_cache
 
struct cthread_objcache * once_cache
 
struct qnode_pool * qnode_pool
 
struct key_pool * key_pool
 
size_t stack_size
 

Detailed Description

Definition of an scheduler struct

Examples
examples/phil/main.c.

Definition at line 72 of file cthread_int.h.

Member Function Documentation

◆ STAILQ_ENTRY()

STAILQ_ENTRY ( cthread_sched  )

Next pointer to next thread

◆ STAILQ_HEAD()

STAILQ_HEAD ( cthread  )

List of threads for this scheduler

◆ CNE_ATOMIC()

CNE_ATOMIC ( uint_least32_t  )

Number of current active threads

Field Documentation

◆ current_cthread

struct cthread* current_cthread

running thread

Definition at line 74 of file cthread_int.h.

◆ lock

Lock for scheduler access

Definition at line 75 of file cthread_int.h.

◆ sched_id

int sched_id

this sched ID

Definition at line 76 of file cthread_int.h.

◆ run_flag

int run_flag

sched shutdown

Definition at line 77 of file cthread_int.h.

◆ ctx

struct ctx ctx

cpu context

Definition at line 77 of file cthread_int.h.

◆ birth

uint64_t birth

time created

Definition at line 79 of file cthread_int.h.

◆ uid_pool

u_id_t* uid_pool

Unique ID pool for a scheduler

Definition at line 80 of file cthread_int.h.

◆ nb_blocked_threads

uint64_t nb_blocked_threads

blocked threads

Definition at line 81 of file cthread_int.h.

◆ ready

struct cthread_queue* ready

local ready queue

Definition at line 84 of file cthread_int.h.

◆ pready

struct cthread_queue* pready

peer ready queue

Definition at line 85 of file cthread_int.h.

◆ cthread_cache

struct cthread_objcache* cthread_cache

free cthreads

Definition at line 86 of file cthread_int.h.

◆ stack_cache

struct cthread_objcache* stack_cache

free stacks

Definition at line 87 of file cthread_int.h.

◆ per_cthread_cache

struct cthread_objcache* per_cthread_cache

free per cthread

Definition at line 88 of file cthread_int.h.

◆ tls_cache

struct cthread_objcache* tls_cache

free TLS

Definition at line 89 of file cthread_int.h.

◆ cond_cache

struct cthread_objcache* cond_cache

free cond vars

Definition at line 90 of file cthread_int.h.

◆ sema_cache

struct cthread_objcache* sema_cache

free semaphores

Definition at line 91 of file cthread_int.h.

◆ barr_cache

struct cthread_objcache* barr_cache

free barriers

Definition at line 92 of file cthread_int.h.

◆ mutex_cache

struct cthread_objcache* mutex_cache

free mutexes

Definition at line 93 of file cthread_int.h.

◆ once_cache

struct cthread_objcache* once_cache

free once structures

Definition at line 94 of file cthread_int.h.

◆ qnode_pool

struct qnode_pool* qnode_pool

pool of queue nodes

Definition at line 95 of file cthread_int.h.

◆ key_pool

struct key_pool* key_pool

pool of free TLS keys

Definition at line 96 of file cthread_int.h.

◆ stack_size

size_t stack_size

Size of the stack per thread

Definition at line 97 of file cthread_int.h.


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