Lely core libraries 2.3.4
ev_loop_ctx Struct Reference

An event loop context. More...

Collaboration diagram for ev_loop_ctx:

Data Fields

size_t refcnt
 The number of references to this context.
 
ev_loop_tloop
 A pointer to the event loop managing this context.
 
ev_future_tfuture
 The future on which the loop is waiting.
 
struct ev_task task
 The task to be executed once the future is ready.
 
int * pstopped
 The address of the stopped flag of the thread.
 
cnd_t cond
 The condition variable used by threads to wait for a task to be submitted to the event loop or for the event loop to be stopped or interrupted.
 
unsigned waiting: 1
 A flag indicating if a thread is waiting on cond.
 
unsigned ready: 1
 A flag indicating if future is ready.
 
unsigned polling: 1
 A flag indicating if a thread is polling.
 
void * thr
 The thread identifier of the polling instance.
 
struct dlnode node
 The node of this context in the list of waiting or polling contexts.
 
struct ev_loop_ctxnext
 A pointer to the next context in the list of running or unused contexts.
 

Detailed Description

An event loop context.

Definition at line 52 of file loop.c.

Field Documentation

◆ refcnt

size_t ev_loop_ctx::refcnt

The number of references to this context.

Once the reference count reaches zero, this struct is reclaimed.

Definition at line 57 of file loop.c.


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