MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / rt_wqueue_add

Function rt_wqueue_add

components/drivers/ipc/waitqueue.c:29–37  ·  view source on GitHub ↗

* @brief This function will insert a node to the wait queue. * * @param queue is a pointer to the wait queue. * * @param node is a pointer to the node to be inserted. */

Source from the content-addressed store, hash-verified

27 * @param node is a pointer to the node to be inserted.
28 */
29void rt_wqueue_add(rt_wqueue_t *queue, struct rt_wqueue_node *node)
30{
31 rt_base_t level;
32
33 level = rt_spin_lock_irqsave(&(queue->spinlock));
34 node->wqueue = queue;
35 rt_list_insert_before(&(queue->waiting_list), &(node->list));
36 rt_spin_unlock_irqrestore(&(queue->spinlock), level);
37}
38
39/**
40 * @brief This function will remove a node from the wait queue.

Callers 5

_wait_for_eventFunction · 0.85
_waitq_inqueueFunction · 0.85
timerfd_readFunction · 0.85
_poll_addFunction · 0.85

Calls 3

rt_list_insert_beforeFunction · 0.85
rt_spin_lock_irqsaveFunction · 0.50

Tested by

no test coverage detected