24#ifndef __KOS_WORKQUEUE_H
25#define __KOS_WORKQUEUE_H
45typedef struct workqueue_job {
Various common macros used throughout the codebase.
Structure describing one running thread.
Definition thread.h:168
Structure describing a job for the work queue.
Definition workqueue.h:45
STAILQ_ENTRY(workqueue_job) entry
List handle.
uint64_t time_ms
Time at which the job will be processed.
Definition workqueue.h:51
Opaque structure describing one work queue.
kthread_t * workqueue_get_thread(workqueue_t *wq)
Get a handle to the underlying thread.
void workqueue_cancel(workqueue_t *wq, workqueue_job_t *job)
Cancel a job and remove it from the work queue.
void workqueue_destroy(workqueue_t *wq)
Destroy a work queue.
void workqueue_kill(workqueue_t *wq)
Stop a work queue from running.
void workqueue_enqueue(workqueue_t *wq, workqueue_job_t *job)
Enqueue a job to a work queue.
workqueue_t * workqueue_create(void)
Create a new work queue.