MentOS  0.8.0
The Mentoring Operating System
Macros | Functions
wait.c File Reference

wait functions. More...

Macros

#define __DEBUG_HEADER__   "[WAIT ]"
 Change header.
 
#define __DEBUG_LEVEL__   LOGLEVEL_NOTICE
 Set log level.
 

Functions

static void __add_wait_queue (wait_queue_head_t *head, wait_queue_entry_t *wq)
 Adds the entry to the wait queue. More...
 
static void __remove_wait_queue (wait_queue_head_t *head, wait_queue_entry_t *wq)
 Removes the entry from the wait queue. More...
 
wait_queue_entry_twait_queue_entry_alloc (void)
 Allocates the memory for a wait_queue_entry. More...
 
void wait_queue_entry_dealloc (wait_queue_entry_t *wait_queue_entry)
 Frees the memory of a wait_queue_entry. More...
 
void init_waitqueue_entry (wait_queue_entry_t *wq, struct task_struct *task)
 Initialize the waiting queue entry. More...
 
void add_wait_queue (wait_queue_head_t *head, wait_queue_entry_t *wq)
 Adds the element to the waiting queue. More...
 
void remove_wait_queue (wait_queue_head_t *head, wait_queue_entry_t *wq)
 Removes the element from the waiting queue. More...
 

Detailed Description

wait functions.

Function Documentation

◆ __add_wait_queue()

static void __add_wait_queue ( wait_queue_head_t head,
wait_queue_entry_t wq 
)
inlinestatic

Adds the entry to the wait queue.

Parameters
headthe wait queue.
wqthe entry.

◆ __remove_wait_queue()

static void __remove_wait_queue ( wait_queue_head_t head,
wait_queue_entry_t wq 
)
inlinestatic

Removes the entry from the wait queue.

Parameters
headthe wait queue.
wqthe entry.

◆ add_wait_queue()

void add_wait_queue ( wait_queue_head_t head,
wait_queue_entry_t wq 
)

Adds the element to the waiting queue.

Parameters
headThe head of the waiting queue.
wqThe entry we insert inside the waiting queue.

◆ init_waitqueue_entry()

void init_waitqueue_entry ( wait_queue_entry_t wq,
struct task_struct task 
)

Initialize the waiting queue entry.

Parameters
wqThe entry we initialize.
taskThe task associated with the entry.

◆ remove_wait_queue()

void remove_wait_queue ( wait_queue_head_t head,
wait_queue_entry_t wq 
)

Removes the element from the waiting queue.

Parameters
headThe head of the waiting queue.
wqThe entry we remove from the waiting queue.

◆ wait_queue_entry_alloc()

wait_queue_entry_t* wait_queue_entry_alloc ( void  )

Allocates the memory for a wait_queue_entry.

Returns
a pointer to the allocated wait_queue_entry.

◆ wait_queue_entry_dealloc()

void wait_queue_entry_dealloc ( wait_queue_entry_t wait_queue_entry)

Frees the memory of a wait_queue_entry.

Parameters
wait_queue_entrypointer to the wait_queue_entry.