|
LibJuno 1.0.1
LibJuno is a lightweight C11 library designed specifically for embedded systems.
|
Pointer trait and helpers for memory operations. More...
#include "juno/macros.h"#include "juno/status.h"#include "juno/module.h"#include <stddef.h>#include <stdalign.h>#include <stdint.h>#include "juno/types.h"

Go to the source code of this file.
Data Structures | |
| struct | JUNO_POINTER_API_TAG |
| Pointer operations API (copy/reset). More... | |
| struct | JUNO_VALUE_POINTER_API_TAG |
| Value-pointer operations API (equality by contents). More... | |
Macros | |
| #define | JunoMemory_PointerInit(ptApi, TYPE_T, pvAddr) (JUNO_POINTER_T){ptApi, pvAddr, sizeof(TYPE_T), alignof(TYPE_T)} |
| Initialize a JUNO_POINTER_T with API, type, and address. | |
| #define | JunoMemory_PointerVerifyType(pointer, type, tApi) |
| Verify pointer descriptor matches an expected type and API. | |
| #define | JUNO_ASSERT_POINTER_TYPE(tStatus, tPointer, tType, tApi) JUNO_ASSERT_SUCCESS((tStatus = JunoMemory_PointerVerifyType(tPointer, tType, tApi)), return tStatus) |
| Assert a pointer descriptor's type and API, returning on failure. | |
Typedefs | |
| typedef struct JUNO_POINTER_TAG | JUNO_POINTER_T |
| typedef struct JUNO_POINTER_API_TAG | JUNO_POINTER_API_T |
| typedef struct JUNO_VALUE_POINTER_API_TAG | JUNO_VALUE_POINTER_API_T |
Functions | |
| struct JUNO_POINTER_TAG | JUNO_TRAIT_ROOT (JUNO_POINTER_API_T, void *pvAddr;size_t zSize;size_t zAlignment;) |
| Structure describing an address, its size and alignment. | |
| JUNO_MODULE_RESULT (JUNO_RESULT_POINTER_T, JUNO_POINTER_T) | |
| Result type carrying a pointer descriptor. | |
| JUNO_MODULE_OPTION (JUNO_OPTION_POINTER_T, JUNO_POINTER_T) | |
| Option type carrying a pointer descriptor. | |
| static JUNO_STATUS_T | JunoMemory_PointerApiVerify (const JUNO_POINTER_API_T *ptPointerApi) |
| Verify that a pointer API provides required functions. | |
| static JUNO_STATUS_T | JunoMemory_ValuePointerApiVerify (const JUNO_VALUE_POINTER_API_T *ptPointerApi) |
| Verify that a value-pointer API provides required functions. | |
| static JUNO_STATUS_T | JunoMemory_PointerVerify (const JUNO_POINTER_T tPointer) |
| Verify a pointer descriptor (API non-null, address non-null, size non-zero). | |
Pointer trait and helpers for memory operations.
This API has been generated by LibJuno: https://www.robinonsay.com/libjuno/
| typedef struct JUNO_POINTER_API_TAG JUNO_POINTER_API_T |
| typedef struct JUNO_POINTER_TAG JUNO_POINTER_T |
| typedef struct JUNO_VALUE_POINTER_API_TAG JUNO_VALUE_POINTER_API_T |
| struct JUNO_POINTER_TAG JUNO_TRAIT_ROOT | ( | JUNO_POINTER_API_T | , |
| void *pvAddr;size_t zSize;size_t zAlignment; | |||
| ) |
Structure describing an address, its size and alignment.