Lines Matching full:node

15   * user "flags" bits for each node. They can be accessed and modified
43 /** Flagged single-linked list node structure. */
69 * @param __sn A sys_sfnode_t pointer to peek each node of the list
75 * @brief Provide the primitive to iterate on a list, from a node in the list
84 * Like SYS_SFLIST_FOR_EACH_NODE(), but __dn already contains a node in the list
91 * @param __sn A sys_sfnode_t pointer to peek each node of the list
92 * it contains the starting node, or NULL to start from the head
110 * @param __sn A sys_sfnode_t pointer to peek each node of the list
117 * @brief Provide the primitive to resolve the container of a list node
195 * These are the only functions that do not treat the list/node pointers
221 static inline sys_sfnode_t *z_sfnode_next_peek(sys_sfnode_t *node) in z_sfnode_next_peek() argument
223 return (sys_sfnode_t *)(node->next_and_flags & ~SYS_SFLIST_FLAGS_MASK); in z_sfnode_next_peek()
226 static inline uint8_t sys_sfnode_flags_get(sys_sfnode_t *node);
236 static inline void z_sflist_head_set(sys_sflist_t *list, sys_sfnode_t *node) in z_sflist_head_set() argument
238 list->head = node; in z_sflist_head_set()
241 static inline void z_sflist_tail_set(sys_sflist_t *list, sys_sfnode_t *node) in z_sflist_tail_set() argument
243 list->tail = node; in z_sflist_tail_set()
247 * @brief Peek the first node from the list
249 * @param list A point on the list to peek the first node from
251 * @return A pointer on the first node of the list (or NULL if none)
259 * @brief Peek the last node from the list
261 * @param list A point on the list to peek the last node from
263 * @return A pointer on the last node of the list (or NULL if none)
277 * @param node A pointer to the node to fetch flags from
281 static inline uint8_t sys_sfnode_flags_get(sys_sfnode_t *node) in sys_sfnode_flags_get() argument
283 return node->next_and_flags & SYS_SFLIST_FLAGS_MASK; in sys_sfnode_flags_get()
287 * @brief Initialize an sflist node
289 * Set an initial flags value for this slist node, which can be a value between
291 * These flags will persist even if the node is moved around within a list,
295 * only be used on a node that hasn't been added to any list.
297 * @param node A pointer to the node to set the flags on
300 static inline void sys_sfnode_init(sys_sfnode_t *node, uint8_t flags) in sys_sfnode_init() argument
303 node->next_and_flags = flags; in sys_sfnode_init()
307 * @brief Set flags value for an sflist node
309 * Set a flags value for this slist node, which can be a value between
311 * These flags will persist even if the node is moved around within a list,
314 * @param node A pointer to the node to set the flags on
317 static inline void sys_sfnode_flags_set(sys_sfnode_t *node, uint8_t flags) in sys_sfnode_flags_set() argument
320 node->next_and_flags = (uintptr_t)(z_sfnode_next_peek(node)) | flags; in sys_sfnode_flags_set()
339 * @brief Peek the next node from current node, node is not NULL
341 * Faster then sys_sflist_peek_next() if node is known not to be NULL.
343 * @param node A pointer on the node where to peek the next node
345 * @return a pointer on the next node (or NULL if none)
347 static inline sys_sfnode_t *sys_sflist_peek_next_no_check(sys_sfnode_t *node);
352 * @brief Peek the next node from current node
354 * @param node A pointer on the node where to peek the next node
356 * @return a pointer on the next node (or NULL if none)
358 static inline sys_sfnode_t *sys_sflist_peek_next(sys_sfnode_t *node);
363 * @brief Prepend a node to the given list
368 * @param node A pointer on the node to prepend
371 sys_sfnode_t *node);
376 * @brief Append a node to the given list
381 * @param node A pointer on the node to append
384 sys_sfnode_t *node);
392 * the pointer to the next node as the first element of a node, to @a list.
421 * @brief Insert a node to the given list
426 * @param prev A pointer on the previous node
427 * @param node A pointer on the node to insert
431 sys_sfnode_t *node);
436 * @brief Fetch and remove the first node of the given list
443 * @return A pointer to the first node of the list
450 * @brief Fetch and remove the first node of the given list
456 * @return A pointer to the first node of the list (or NULL if empty)
463 * @brief Remove a node
468 * @param prev_node A pointer on the previous node
469 * (can be NULL, which means the node is the list's head)
470 * @param node A pointer on the node to remove
474 sys_sfnode_t *node);
479 * @brief Find and remove a node from a list
484 * @param node A pointer on the node to remove from the list
486 * @return true if node was removed
489 sys_sfnode_t *node);