* @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. */
| 27 | * @param node is a pointer to the node to be inserted. |
| 28 | */ |
| 29 | void 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. |
no test coverage detected