初始化版本

This commit is contained in:
冯佳
2026-02-09 10:27:21 +08:00
commit 64d767932f
4467 changed files with 2486822 additions and 0 deletions

View File

@ -0,0 +1,34 @@
#ifndef __OSAL_THREAD_H__
#define __OSAL_THREAD_H__
#include "osal_def.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef void* osal_thread_t;
typedef void (*osal_thread_entry)(void* parameter);
/* Thread API */
osal_thread_t osal_thread_create(const char* name,
osal_thread_entry entry,
void* parameter,
osal_size_t stack_size,
osal_priority_t priority);
osal_err_t osal_thread_delete(osal_thread_t thread);
osal_err_t osal_thread_start(osal_thread_t thread);
osal_err_t osal_thread_suspend(osal_thread_t thread);
osal_err_t osal_thread_resume(osal_thread_t thread);
osal_err_t osal_thread_yield(void);
osal_err_t osal_thread_control(osal_thread_t thread, int cmd, void* arg);
osal_thread_t osal_thread_self(void);
osal_err_t osal_thread_delay(osal_tick_t tick);
osal_err_t osal_thread_mdelay(osal_int32_t ms);
#ifdef __cplusplus
}
#endif
#endif /* __OSAL_THREAD_H__ */