@web-font-path: "roboto-debian.css";
Loading...
Searching...
No Matches
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
 private link list pointer
void(* 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".
bool work_pending
 True if the worker need do_work called.
void * user_data
 User data associated with the worker instance.

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). Its methods are called from the async_context under lock at the given time

See also
async_context_add_at_time_worker_at
async_context_add_at_time_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

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