Function uacpi_namespace_node_next

uacpi_status uacpi_namespace_node_next(uacpi_namespace_node* parent, uacpi_namespace_node** iter)

Description

Retrieve the next peer namespace node of '*iter', or, if '*iter' is

UACPI_NULL, retrieve the first child of 'parent' instead. The resulting namespace node is stored at '*iter'. This API can be used to implement an "iterator" version of the for_each_child helpers. Example usage: void recurse(uacpi_namespace_node *parent) { uacpi_namespace_node *iter = UACPI_NULL; while (uacpi_namespace_node_next(parent, &iter) == UACPI_STATUS_OK) { // Do something with iter... descending_callback(iter); // Recurse down to walk over the children of iter recurse(iter); } } Prefer the for_each_child family of helpers if possible instead of this API as they avoid recursion and/or the need to use dynamic data structures entirely.