native 0.0.1
Vectors, masks and wide register packs for C++26
Loading...
Searching...
No Matches
Handles

Handles are a way to identify resources like files, sockets, and processes. More...

Collaboration diagram for Handles:

Macros

#define native_acquire_handle(__x)
 indicates this method returns an acquired resource
#define native_release_handle(__x)
 Indicates this argument is an acquired resource that is being released with a tag.
#define native_use_handle(__x)
 indicates this argument is a use of a resource, but does not release it.

Detailed Description

Handles are a way to identify resources like files, sockets, and processes.

They are more opaque than pointers and widely used in system programming. They have similar risks such as never releasing a resource associated with a handle, attempting to use a handle that was already released, or trying to release a handle twice.

Using the annotations below it is possible to make the ownership of the handles clear: whose responsibility is to release them. They can also aid static analysis tools to find bugs.

*‍/

Macro Definition Documentation

◆ native_acquire_handle

#define native_acquire_handle ( __x)

indicates this method returns an acquired resource

Names its type with a tag.

If applied to a method it refers to the function result If applied to an argument it indicates that argument is an out-parameter providing the value

Definition at line 926 of file attributes.h.