Macros | Functions
picotm-lib-ptr.h File Reference
#include "compiler.h"
#include <stddef.h>
#include <stdint.h>

Macros

#define picotm_containerof(ptr, type, member)
 
#define picotm_sizeof_align(__type)
 Returns the number of size and alignment bytes of a given type. More...
 

Functions

static uintptr_t picotm_address_ceil (uintptr_t addr, size_t algn)
 Rounds an address upwards to the nearest address with the given alignment. More...
 
static PICOTM_BEGIN_DECLS uintptr_t picotm_address_floor (uintptr_t addr, size_t algn)
 Rounds an address downwards to the nearest address with the given alignment. More...
 
static void * picotm_ptr_ceil (const void *ptr, size_t algn)
 Rounds a memory location upwards to the nearest address with the given alignment. More...
 
static ptrdiff_t picotm_ptr_diff (const void *hi, const void *lo)
 Subtracts two memory locations and returns the number of raw bytes between them. More...
 
static void * picotm_ptr_floor (const void *ptr, size_t algn)
 Rounds a memory location downwards to the nearest address with the given alignment. More...