86typedef struct aml_namespace_overlay
90 struct aml_namespace_overlay*
parent;
112#define AML_NAME(a, b, c, d) \
113 ((aml_name_t)((((aml_name_t)(a) & 0xFF)) | (((aml_name_t)(b) & 0xFF) << 8) | (((aml_name_t)(c) & 0xFF) << 16) | \
114 (((aml_name_t)(d) & 0xFF) << 24)))
121#define AML_NAME_UNDEFINED AML_NAME('x', 'x', 'x', 'x')
129#define AML_NAME_TO_STRING(name) \
130 (char[]){((name)) & 0xFF, ((name) >> 8) & 0xFF, ((name) >> 16) & 0xFF, ((name) >> 24) & 0xFF, '\0'}
aml_object_t * aml_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_t * aml_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.
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_init(aml_object_t *root)
Initialize the namespace heirarchy.
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.
void aml_namespace_overlay_set_parent(aml_namespace_overlay_t *overlay, aml_namespace_overlay_t *parent)
Set the parent of a namespace overlay.
aml_object_t * aml_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.
uint64_t aml_namespace_expose(void)
Expose the entire namespace heirarchy to sysfs.
aml_object_t * aml_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.
aml_namespace_overlay_t * aml_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.
uint64_t aml_namespace_overlay_init(aml_namespace_overlay_t *overlay)
Initialize a namespace overlay.
void aml_namespace_remove(aml_object_t *object)
Remove an object from the namespace heirarchy it was added to.
void aml_namespace_overlay_deinit(aml_namespace_overlay_t *overlay)
Deinitialize a namespace overlay.
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.
uint32_t aml_name_t
Name type.
aml_object_t * aml_namespace_get_root(void)
Get the root object of the namespace heirarchy.
struct aml_namespace_overlay * parent
The parent overlay, or NULL if none.
map_t map
Used to find the children of namespaces using their id and the name of the child.
list_t objects
List of all objects in this namespace. Used for fast iteration.