Opaque 64-bit capability token.
More...
|
|
constexpr | cap_token (u64 v) noexcept |
| constexpr auto | derive (cap_rights subset) const noexcept -> cap_token |
| | Derive a new token with a subset of the rights.
|
|
constexpr auto | generation () const noexcept -> u16 |
| | Extract the generation field.
|
|
constexpr auto | has_right (cap_rights r) const noexcept -> bool |
| | Check whether a specific right is present.
|
|
constexpr auto | object_id () const noexcept -> u16 |
| | Extract the object ID field.
|
|
constexpr | operator bool () const noexcept |
| | Check whether the token is valid (non-null).
|
|
constexpr auto | operator!= (cap_token o) const noexcept -> bool |
|
constexpr auto | operator== (cap_token o) const noexcept -> bool |
| | Compare two tokens for equality.
|
|
constexpr auto | rights () const noexcept -> cap_rights |
| | Extract the rights mask.
|
|
constexpr auto | type () const noexcept -> cap_type |
| | Extract the type field.
|
|
|
u64 | raw {0} |
| | Raw 64-bit encoding.
|
Opaque 64-bit capability token.
- Note
- Tokens are value types (copyable, movable).
◆ derive()
|
|
inlinenodiscardconstexprexportnoexcept |
Derive a new token with a subset of the rights.
- Parameters
-
| [in] | subset | Rights to retain in the derived token. |
◆ make()
|
|
inlinestaticconstexprexportnoexcept |
Construct a token from its components.
- Parameters
-
| [in] | type | Resource type discriminator. |
| [in] | obj_id | Nucleus capability-slot index. |
| [in] | gen | Object generation counter. |
| [in] | rights | Delegated rights mask. |
The documentation for this struct was generated from the following file: