MCPcopy Create free account
hub / github.com/apache/cloudberry / slist_pop_head_node

Function slist_pop_head_node

src/include/lib/ilist.h:614–624  ·  view source on GitHub ↗

* Remove and return the first node from a list (there must be one). */

Source from the content-addressed store, hash-verified

612 * Remove and return the first node from a list (there must be one).
613 */
614static inline slist_node *
615slist_pop_head_node(slist_head *head)
616{
617 slist_node *node;
618
619 Assert(!slist_is_empty(head));
620 node = head->head.next;
621 head->head.next = node->next;
622 slist_check(head);
623 return node;
624}
625
626/*
627 * Check whether 'node' has a following node.

Callers 2

dsm_detachFunction · 0.85
reset_on_dsm_detachFunction · 0.85

Calls 2

slist_is_emptyFunction · 0.85
slist_checkFunction · 0.85

Tested by

no test coverage detected