kernel: use a union for kobject data values
Rather than stuffing various values in a uintptr_t based on type using casts, use a union for this instead. No functional difference, but the semantics of the data member are now much clearer to the casual observer since it is now formally defined by this union. Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
parent
e13bb7e999
commit
f2734ab022
8 changed files with 46 additions and 16 deletions
|
@ -128,9 +128,8 @@ includes:
|
|||
instance of :cpp:enum:`k_objects`.
|
||||
* A set of flags for that object. This is currently used to track
|
||||
initialization state and whether an object is public or not.
|
||||
* An extra data field. This is currently used for thread stack objects
|
||||
to denote how large the stack is, and for thread objects to indicate
|
||||
the thread's index in kernel object permission bitfields.
|
||||
* An extra data field. The semantics of this field vary by object type, see
|
||||
the definition of :c:type:`union z_object_data`.
|
||||
|
||||
Dynamic objects allocated at runtime are tracked in a runtime red/black tree
|
||||
which is used in parallel to the gperf table when validating object pointers.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue