KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches
workqueue_t Struct Reference

Opaque structure describing one work queue. More...

#include <workqueue.h>

Related Symbols

(Note that these are not member symbols.)

workqueue_tworkqueue_create (void)
 Create a new 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.
 
void workqueue_cancel (workqueue_t *wq, workqueue_job_t *job)
 Cancel a job and remove it from the work queue.
 
kthread_tworkqueue_get_thread (workqueue_t *wq)
 Get a handle to the underlying thread.
 

Detailed Description

Opaque structure describing one work queue.

Friends And Related Symbol Documentation

◆ workqueue_cancel()

void workqueue_cancel ( workqueue_t * wq,
workqueue_job_t * job )
related

Cancel a job and remove it from the work queue.

This function can be used when a job should be removed from a work queue before the job is set to be executed (note that jobs are automatically removed from the work queue right before their execution).

Parameters
wqA pointer to the work queue
jobA pointer to the job to cancel
See also
workqueue_create

◆ workqueue_create()

workqueue_t * workqueue_create ( void )
related

Create a new work queue.

This function will create a new work queue.

Returns
The new work queue on success, NULL on failure.
See also
workqueue_destroy

◆ workqueue_destroy()

void workqueue_destroy ( workqueue_t * wq)
related

Destroy a work queue.

This function will destroy a work queue and free up any allocated memory.

Parameters
wqA pointer to the work queue
See also
workqueue_create

◆ workqueue_enqueue()

void workqueue_enqueue ( workqueue_t * wq,
workqueue_job_t * job )
related

Enqueue a job to a work queue.

This function will enqueue a job to the given work queue. The job's struct must have been initialized properly.

Parameters
wqA pointer to the work queue
jobA pointer to the job to enqueue
See also
workqueue_create

◆ workqueue_get_thread()

kthread_t * workqueue_get_thread ( workqueue_t * wq)
related

Get a handle to the underlying thread.

Parameters
wqThe workqueue whose thread should be returned.
Returns
A handle to the underlying thread.

◆ workqueue_kill()

void workqueue_kill ( workqueue_t * wq)
related

Stop a work queue from running.

This function can optionally be called before destroying a work queue. The work queue then stops processing previously or newly enqueued jobs.

Parameters
wqA pointer to the work queue
See also
workqueue_destroy

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