async_when_pending_worker Struct Reference

A "worker" instance used by an async_context. More...

#include <async_context.h>

Collaboration diagram for async_when_pending_worker:

Data Fields

struct async_when_pending_workernext
 
void(* do_work )(async_context_t *context, struct async_when_pending_worker *worker)
 
bool work_pending
 

Detailed Description

A "worker" instance used by an async_context.

A "worker" represents some external entity that must do work in response to some external stimulus (usually an IRQ). It's methods are called from the async_context under lock at the given time

See also
async_context_add_worker_at
async_context_add_worker_in_ms

Field Documentation

◆ do_work

void(* async_when_pending_worker::do_work) (async_context_t *context, struct async_when_pending_worker *worker)

Called by the async_context when the worker has been marked as having "work pending"

Parameters
contextthe async_context
workerthe function to be called when work is pending

◆ next

struct async_when_pending_worker* async_when_pending_worker::next

private link list pointer

◆ work_pending

bool async_when_pending_worker::work_pending

True if the worker need do_work called


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