7 #ifndef ZRTOS_VHEAP_TASK_PTHREAD_H 8 #define ZRTOS_VHEAP_TASK_PTHREAD_H 37 void *(*callback)(
void*args);
42 #define PTHREAD_MUTEX_INITIALIZER \ 44 .mutex = ZRTOS_TASK_MUTEX__INITIALIZER \ 55 zrtos_task_pthread__heap = heap;
111 __builtin_unreachable();
120 ,
void *(*start_routine)(
void *)
#define ZRTOS_TASK_SCHEDULER__DO_NOT_DISTURB(code)
int pthread_mutex_init(pthread_mutex_t *restrict mutex, const pthread_mutexattr_t *restrict attr)
static void zrtos_task_pthread__free(zrtos_task_t *task)
uint8_t zrtos_arch_stack_t
void * zrtos_types__ptr_subtract(void *ptr, size_t byte_len)
#define ZRTOS_TYPES__MAX(a, b)
void *(* callback)(void *args)
bool zrtos_task_scheduler__remove_task(zrtos_task_t *task)
int zrtos_task_mutex__try_lock(zrtos_task_mutex_t *thiz)
void zrtos_task_pthread__trampoline_cb(void *args)
int pthread_mutexattr_init(pthread_mutexattr_t *attr)
int pthread_mutex_unlock(pthread_mutex_t *mutex)
void zrtos_task_pthread__set_heap(void *heap)
#define ZRTOS_ARCH__GET_CPU_STATE_BUFFER_LENGTH()
void * zrtos_task_pthread__heap
void zrtos_task_mutex__deinit(zrtos_task_mutex_t *thiz)
bool zrtos_task_scheduler__add_task(zrtos_task_t *task)
void * zrtos_malloc__malloc(zrtos_malloc_t *thiz, size_t length)
void zrtos_malloc__free(void *ptr)
int zrtos_task_mutex__unlock(zrtos_task_mutex_t *thiz)
pthread_t pthread_self(void)
bool zrtos_task__init_ex(zrtos_task_t *thiz, zrtos_arch_stack_t *heap, zrtos_arch_callback_t callback, void *args)
bool zrtos_task__is_done(zrtos_task_t *thiz)
int pthread_attr_init(pthread_attr_t *attr)
static zrtos_task_t * zrtos_task_scheduler__get_any_child(zrtos_task_t *task)
int zrtos_task_mutex__lock(zrtos_task_mutex_t *thiz)
void * zrtos_types__ptr_add(void *ptr, size_t byte_len)
void * zrtos_task_pthread__get_heap(void)
int pthread_mutexattr_destroy(pthread_mutexattr_t *attr)
int zrtos_types__ptr_cmp(void *a, void *b)
int pthread_mutex_lock(pthread_mutex_t *mutex)
int pthread_equal(pthread_t t1, pthread_t t2)
bool zrtos_task_mutex__init(zrtos_task_mutex_t *thiz)
int pthread_attr_destroy(pthread_attr_t *attr)
int pthread_create(pthread_t *restrict thread, const pthread_attr_t *restrict attr, void *(*start_routine)(void *), void *restrict arg)
void zrtos_task__set_done(zrtos_task_t *thiz)
int pthread_attr_setstacksize(pthread_attr_t *attr, size_t stacksize)
int pthread_mutex_trylock(pthread_mutex_t *mutex)
zrtos_task_t * _zrtos_task_scheduler__get_active_task(void)
bool zrtos_task_scheduler__has_task(zrtos_task_t *task)
struct _zrtos_task_t zrtos_task_t
int pthread_mutex_destroy(pthread_mutex_t *mutex)
#define ZRTOS_ARCH__GET_FN_CALL_STACK_LENGTH()
int pthread_join(pthread_t thread, void **retval)
static void _zrtos_task_scheduler__on_tick_ex(void)