PatchworkOS
Loading...
Searching...
No Matches
namespace.c File Reference

Go to the source code of this file.

Functions

static map_key_t aml_object_map_key (aml_object_id_t parentId, aml_name_t name)
 
static aml_object_taml_namespace_traverse_parents (aml_object_t *current, uint64_t depth)
 
static aml_object_taml_namespace_search_single_name (aml_namespace_overlay_t *overlay, aml_object_t *current, aml_name_t name)
 
uint64_t aml_namespace_init (aml_object_t *root)
 Initialize the namespace heirarchy.
 
uint64_t aml_namespace_expose (void)
 Expose the entire namespace heirarchy to sysfs.
 
aml_object_taml_namespace_get_root (void)
 Get the root object of the namespace heirarchy.
 
aml_object_taml_namespace_find_child (aml_namespace_overlay_t *overlay, aml_object_t *parent, aml_name_t name)
 Find a child object directly under a parent object in the namespace heirarchy.
 
aml_object_taml_namespace_find (aml_namespace_overlay_t *overlay, aml_object_t *start, uint64_t nameCount,...)
 Find an object in the namespace heirarchy by name segments.
 
aml_object_taml_namespace_find_by_name_string (aml_namespace_overlay_t *overlay, aml_object_t *start, const aml_name_string_t *nameString)
 Find an object in the namespace heirarchy by a name string.
 
aml_object_taml_namespace_find_by_path (aml_namespace_overlay_t *overlay, aml_object_t *start, const char *path)
 Find an object in the namespace heirarchy by a path string.
 
uint64_t aml_namespace_add_child (aml_namespace_overlay_t *overlay, aml_object_t *parent, aml_name_t name, aml_object_t *object)
 Add an child to a parent in the namespace heirarchy.
 
uint64_t aml_namespace_add_by_name_string (aml_namespace_overlay_t *overlay, aml_object_t *start, const aml_name_string_t *nameString, aml_object_t *object)
 Add an object to the namespace heirarchy using a name string.
 
void aml_namespace_remove (aml_object_t *object)
 Remove an object from the namespace heirarchy it was added to.
 
uint64_t aml_namespace_commit (aml_namespace_overlay_t *overlay)
 Commit all names in a namespace overlay to the global namespace heirarchy.
 
uint64_t aml_namespace_overlay_init (aml_namespace_overlay_t *overlay)
 Initialize a namespace overlay.
 
void aml_namespace_overlay_deinit (aml_namespace_overlay_t *overlay)
 Deinitialize a namespace overlay.
 
void aml_namespace_overlay_set_parent (aml_namespace_overlay_t *overlay, aml_namespace_overlay_t *parent)
 Set the parent of a namespace overlay.
 
aml_namespace_overlay_taml_namespace_overlay_get_highest_that_contains (aml_namespace_overlay_t *overlay, aml_object_t *object)
 Search a overlay and its parents for the first overlay that contains the given object.
 

Variables

static aml_namespace_overlay_t globalOverlay
 
static aml_object_tnamespaceRoot = NULL
 

Function Documentation

◆ aml_namespace_search_single_name()

static aml_object_t * aml_namespace_search_single_name ( aml_namespace_overlay_t overlay,
aml_object_t current,
aml_name_t  name 
)
inlinestatic

Definition at line 43 of file namespace.c.

References aml_namespace_find_child(), DEREF, next, NULL, and REF.

Referenced by aml_namespace_find(), and aml_namespace_find_by_name_string().

◆ aml_namespace_traverse_parents()

static aml_object_t * aml_namespace_traverse_parents ( aml_object_t current,
uint64_t  depth 
)
inlinestatic

◆ aml_object_map_key()

static map_key_t aml_object_map_key ( aml_object_id_t  parentId,
aml_name_t  name 
)
inlinestatic

Variable Documentation

◆ globalOverlay

◆ namespaceRoot