native 0.0.1
Vectors, masks and wide register packs for C++26
Loading...
Searching...
No Matches
Performance Constraints
Collaboration diagram for Performance Constraints:

Macros

#define native_allocating
 Declares a function potentially allocates heap memory. Prevents inference of nonallocating.
#define native_blocking
 Declares a function potentially blocks. Prevents inference of native_nonblocking.
#define native_nonblocking
 Declares a function does not block.
#define native_noblock(__x)
 a bool parameterized version of native_nonblocking
#define native_nonallocating
 Declares a function does not allocate heap memory.
#define native_noalloc(__x)
 a bool parameterized version of native_nonallocating

Detailed Description

  • When assigning or otherwise converting to a function pointer of nonblocking or nonallocating type, the source must also be a function or function pointer of that type, unless it is a null pointer, i.e. the attributes should not be “spoofed”. Conversions that remove the attributes are transparent and valid.
  • An override of a nonblocking or nonallocating virtual method must also be declared with that same attribute (or a stronger one.) An overriding method may add an attribute.
  • A redeclaration of a nonblocking or nonallocating function must also be declared with the same attribute (or a stronger one). A redeclaration may add an attribute.
Note

native_noalloc(x) and native_noblock(x) are necessitated by the inability to write a macro that merely may take an argument.

Macro Definition Documentation

◆ native_noalloc

#define native_noalloc ( __x)

a bool parameterized version of native_nonallocating

Definition at line 1328 of file attributes.h.

◆ native_noblock

#define native_noblock ( __x)

a bool parameterized version of native_nonblocking

Definition at line 1329 of file attributes.h.