41 #if (CH_CFG_USE_MEMPOOLS == TRUE) || defined(__DOXYGEN__) 80 chDbgCheck((mp != NULL) && (size >=
sizeof(
void *)));
209 #if (CH_CFG_USE_SEMAPHORES == TRUE) || defined(__DOXYGEN__)
uint64_t sysinterval_t
Type of time interval.
static void chSysLock(void)
Enters the kernel lock state.
void chPoolLoadArray(memory_pool_t *mp, void *p, size_t n)
Loads a memory pool with an array of static objects.
void chPoolFree(memory_pool_t *mp, void *objp)
Releases an object into a memory pool.
msg_t chSemWaitTimeoutS(semaphore_t *sp, sysinterval_t timeout)
Performs a wait operation on a semaphore with timeout specification.
void * chGuardedPoolAllocTimeout(guarded_memory_pool_t *gmp, sysinterval_t timeout)
Allocates an object from a guarded memory pool.
memgetfunc_t provider
Memory blocks provider for this pool.
unsigned align
Required alignment.
memory_pool_t pool
The memory pool itself.
#define MEM_ALIGN_MASK(a)
Alignment mask constant.
static void chGuardedPoolAdd(guarded_memory_pool_t *gmp, void *objp)
Adds an object to a guarded memory pool.
static void chSysUnlock(void)
Leaves the kernel lock state.
void chGuardedPoolLoadArray(guarded_memory_pool_t *gmp, void *p, size_t n)
Loads a guarded memory pool with an array of static objects.
size_t object_size
Memory pool objects size.
static void chGuardedPoolFreeI(guarded_memory_pool_t *gmp, void *objp)
Releases an object into a guarded memory pool.
void chDbgCheckClassI(void)
I-class functions context check.
void chSchRescheduleS(void)
Performs a reschedule if a higher priority thread is runnable.
void * chPoolAlloc(memory_pool_t *mp)
Allocates an object from a memory pool.
#define chDbgCheck(c)
Function parameters check.
struct pool_header * next
Pointer to the header.
#define MSG_OK
Normal wakeup message.
void * chPoolAllocI(memory_pool_t *mp)
Allocates an object from a memory pool.
#define chDbgAssert(c, r)
Condition assertion.
void chSemObjectInit(semaphore_t *sp, cnt_t n)
Initializes a semaphore with the specified counter value.
void chGuardedPoolObjectInitAligned(guarded_memory_pool_t *gmp, size_t size, unsigned align)
Initializes an empty guarded memory pool.
void * chGuardedPoolAllocTimeoutS(guarded_memory_pool_t *gmp, sysinterval_t timeout)
Allocates an object from a guarded memory pool.
void chGuardedPoolFree(guarded_memory_pool_t *gmp, void *objp)
Releases an object into a guarded memory pool.
semaphore_t sem
Counter semaphore guarding the memory pool.
void chPoolObjectInitAligned(memory_pool_t *mp, size_t size, unsigned align, memgetfunc_t provider)
Initializes an empty memory pool.
void *(* memgetfunc_t)(size_t size, unsigned align)
Memory get function.
Guarded memory pool descriptor.
static void chPoolAdd(memory_pool_t *mp, void *objp)
Adds an object to a memory pool.
ChibiOS/RT main include file.
void chPoolFreeI(memory_pool_t *mp, void *objp)
Releases an object into a memory pool.