31 #if (CH_CFG_USE_DYNAMIC == TRUE) || defined(__DOXYGEN__) 57 #if (CH_CFG_USE_HEAP == TRUE) || defined(__DOXYGEN__) 83 const char *name, tprio_t prio,
96 (stkalign_t *)((uint8_t *)wsp + size),
102 #if CH_DBG_FILL_THREADS == TRUE 104 (uint8_t *)wsp + size,
118 #if (CH_CFG_USE_MEMPOOLS == TRUE) || defined(__DOXYGEN__) 146 tprio_t prio,
tfunc_t pf,
void *arg) {
166 #if CH_DBG_FILL_THREADS == TRUE
static void chSysLock(void)
Enters the kernel lock state.
thread_t * chThdCreateSuspendedI(const thread_descriptor_t *tdp)
Creates a new thread into a static memory area.
Type of a thread descriptor.
#define CH_DBG_STACK_FILL_VALUE
Fill value for thread stack area in debug mode.
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.
void(* tfunc_t)(void *p)
Thread function.
static void chSysUnlock(void)
Leaves the kernel lock state.
#define CH_FLAG_MODE_HEAP
Thread allocated from a Memory Heap.
void _thread_memfill(uint8_t *startp, uint8_t *endp, uint8_t v)
Memory fill utility.
size_t object_size
Memory pool objects size.
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.
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.
#define chDbgCheck(c)
Function parameters check.
#define CH_FLAG_MODE_MPOOL
Thread allocated from a Memory Pool.
void * chPoolAlloc(memory_pool_t *mp)
Allocates an object from a memory pool.
#define MSG_OK
Normal wakeup message.
void * mpool
Memory Pool where the thread workspace is returned.
void chSchWakeupS(thread_t *ntp, msg_t msg)
Wakes up a thread.
ChibiOS/RT main include file.
tmode_t flags
Various thread flags.
Structure describing a memory heap.
Structure representing a thread.