CHERIoT RTOS
A compartmentalised RTOS for CHERIoT hardware
Loading...
Searching...
No Matches
__cheri_sealed.h
1#pragma once
2
3#ifndef __ASSEMBLER__
4/**
5 * Macro to allow sealing to work with old and new compilers. With new
6 * compilers, this will expand to a sealed version of the pointer type provided
7 * as the argument. For old compilers it will expand to the opaque type that
8 * older versions of CHERIoT RTOS used for all sealed objects.
9 *
10 * You can explicitly opt into the old behaviour by defining
11 * `CHERIOT_NO_SEALED_POINTERS`.
12 */
13# ifndef CHERI_SEALED
14# if __has_extension(cheri_sealed_pointers) && \
15 !defined(CHERIOT_NO_SEALED_POINTERS)
16# define CHERI_SEALED(T) T __sealed_capability
17# else
18# define CHERI_SEALED(T) struct TokenObjectType *
19# endif
20# endif
21
22typedef struct TokenObjectType *SObj
23 __attribute__((deprecated("SObj renamed to TokenObjectType *")));
24
25#endif