|
CHERIoT RTOS
A compartmentalised RTOS for CHERIoT hardware
|
Pointer utilities. More...
Go to the source code of this file.
Classes | |
| class | ds::pointer::proxy::Pointer< T > |
| Pointer references are pointer proxies, shockingly enough. More... | |
| class | ds::pointer::proxy::PtrAddr< T > |
| Equipped with a context for bounds, an address reference can be a proxy for a pointer. More... | |
| class | ds::pointer::proxy::OffsetPtrAddr< Offset, T > |
| Like the above, but with a constant offset on the interpretation of its addresss fields. More... | |
Concepts | |
| concept | ds::pointer::proxy::Proxies |
| Proxies<P,T> if P is a proxy object for T*-s. | |
Functions | |
| template<typename T, typename U> | |
| static T * | ds::pointer::offset (U *base, std::integral auto offset) |
| Offset a pointer by a number of bytes. | |
| static size_t | ds::pointer::diff (const void *base, const void *cursor) |
| Compute the unsigned difference in bytes between two pointers' target addresses. | |
| template<typename T> | |
| ds::pointer::proxy::PtrAddr (T *, ptraddr_t) -> PtrAddr< T > | |
| Deduction gude for the common enough case where the context type and the represented type are equal. | |
Pointer utilities.
Definition in file pointer.h.
|
inlinestatic |
|
inlinestatic |
Offset a pointer by a number of bytes.
The return type must be explicitly specified by the caller. The type of the displacement offset (Offset) is templated so that we can accept both signed and unsigned offsets.
Definition at line 24 of file pointer.h.
References CHERI::Capability< T, IsSealedT >::address().