Lines Matching defs:node
21 * @node: timer node to be added
23 * Adds the timer node to the timerqueue, sorted by the node's expires
27 bool timerqueue_add(struct timerqueue_head *head, struct timerqueue_node *node)
35 WARN_ON_ONCE(!RB_EMPTY_NODE(&node->node));
39 ptr = rb_entry(parent, struct timerqueue_node, node);
40 if (node->expires < ptr->expires) {
47 rb_link_node(&node->node, parent, p);
48 rb_insert_color_cached(&node->node, &head->rb_root, leftmost);
58 * @node: timer node to be removed
60 * Removes the timer node from the timerqueue. Returns true if the queue is
63 bool timerqueue_del(struct timerqueue_head *head, struct timerqueue_node *node)
65 WARN_ON_ONCE(RB_EMPTY_NODE(&node->node));
67 rb_erase_cached(&node->node, &head->rb_root);
68 RB_CLEAR_NODE(&node->node);
77 * @node: Pointer to a timer.
79 * Provides the timer that is after the given node. This is used, when
83 struct timerqueue_node *timerqueue_iterate_next(struct timerqueue_node *node)
87 if (!node)
89 next = rb_next(&node->node);
92 return container_of(next, struct timerqueue_node, node);