31#if (CH_CFG_USE_DYNAMIC == TRUE) || defined(__DOXYGEN__)
57#if (CH_CFG_USE_HEAP == TRUE) || defined(__DOXYGEN__)
92 wend = (
void *)((uint8_t *)wbase + size);
96#if CH_DBG_FILL_THREADS == TRUE
110#if (CH_CFG_USE_MEMPOOLS == TRUE) || defined(__DOXYGEN__)
148 wend = (
void *)((uint8_t *)wbase + mp->
object_size);
152#if CH_DBG_FILL_THREADS == TRUE
ChibiOS/RT main include file.
#define chDbgCheck(c)
Function parameters check.
thread_t * chThdCreateFromHeap(memory_heap_t *heapp, size_t size, const char *name, tprio_t prio, tfunc_t pf, void *arg)
Creates a new thread allocating the memory from the heap.
thread_t * chThdCreateFromMemoryPool(memory_pool_t *mp, const char *name, tprio_t prio, tfunc_t pf, void *arg)
Creates a new thread allocating the memory from the specified memory pool.
struct ch_thread thread_t
Type of a thread structure.
struct memory_heap memory_heap_t
Type of a memory heap.
void * chHeapAllocAligned(memory_heap_t *heapp, size_t size, unsigned align)
Allocates a block of memory from the heap by using the first-fit algorithm.
void * chPoolAlloc(memory_pool_t *mp)
Allocates an object from a memory pool.
void chSchWakeupS(thread_t *ntp, msg_t msg)
Wakes up a thread.
#define MSG_OK
Normal wakeup message.
#define CH_FLAG_MODE_MPOOL
Thread allocated from a Memory Pool.
#define CH_FLAG_MODE_HEAP
Thread allocated from a Memory Heap.
static void chSysLock(void)
Enters the kernel lock state.
static void chSysUnlock(void)
Leaves the kernel lock state.
void(* tfunc_t)(void *p)
Thread function.
void __thd_stackfill(uint8_t *startp, uint8_t *endp)
Stack fill utility.
#define THD_DESCRIPTOR(name, wbase, wend, prio, funcp, arg)
Thread descriptor initializer with no affinity.
thread_t * chThdCreateSuspendedI(const thread_descriptor_t *tdp)
Creates a new thread.
void * mpool
Memory Pool where the thread workspace is returned.
tmode_t flags
Various thread flags.
size_t object_size
Memory pool objects size.
Type of a thread descriptor.