PatchworkOS  966e257
A non-POSIX operating system.
Loading...
Searching...
No Matches
wait.c File Reference
#include <kernel/cpu/irq.h>
#include <kernel/sched/wait.h>
#include <kernel/cpu/cpu.h>
#include <kernel/log/log.h>
#include <kernel/log/panic.h>
#include <kernel/sched/sched.h>
#include <kernel/sched/clock.h>
#include <kernel/sched/thread.h>
#include <kernel/sched/timer.h>
#include <kernel/sync/lock.h>
#include <assert.h>
#include <errno.h>
#include <stdatomic.h>
#include <stdlib.h>
#include <sys/list.h>
Include dependency graph for wait.c:

Go to the source code of this file.

Functions

static void wait_remove_wait_entries (thread_t *thread, errno_t err)
 
void wait_queue_init (wait_queue_t *queue)
 Initialize wait queue.
 
void wait_queue_deinit (wait_queue_t *queue)
 Deinitialize wait queue.
 
void wait_client_init (wait_client_t *client)
 Initialize a threads wait client.
 
void wait_init (wait_t *wait)
 Initialize an instance of the waiting subsystem.
 
void wait_check_timeouts (interrupt_frame_t *frame, cpu_t *self)
 Check for timeouts and unblock threads as needed.
 
uint64_t wait_block_prepare (wait_queue_t **waitQueues, uint64_t amount, clock_t timeout)
 Prepare to block the currently running thread.
 
void wait_block_cancel (void)
 Cancels blocking of the currently running thread.
 
uint64_t wait_block_commit (void)
 Block the currently running thread.
 
bool wait_block_finalize (interrupt_frame_t *frame, cpu_t *self, thread_t *thread, clock_t uptime)
 Finalize blocking of a thread.
 
void wait_unblock_thread (thread_t *thread, errno_t err)
 Unblock a specific thread.
 
uint64_t wait_unblock (wait_queue_t *queue, uint64_t amount, errno_t err)
 Unblock threads waiting on a wait queue.
 

Function Documentation

◆ wait_remove_wait_entries()

static void wait_remove_wait_entries ( thread_t thread,
errno_t  err 
)
static

Definition at line 19 of file wait.c.

Here is the call graph for this function:
Here is the caller graph for this function: