|
WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
|
#include <los_task.h>#include <los_base.h>#include <los_tick.h>#include <los_sched_pri.h>#include <los_config.h>#include <los_memory.h>#include "soc_osal.h"#include "osal_inner.h"
宏定义 | |
| #define | MINIMAL_STACK_SIZE LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE |
函数 | |
| osal_task * | osal_kthread_create (osal_kthread_handler handler, void *data, const char *name, unsigned int stack_size) |
| Provides an interface for creating a thread and invokes kthread_run for creating a kernel thread. | |
| int | osal_kthread_set_priority (osal_task *task, unsigned int priority) |
| Setting the priority of a thread. | |
| void | osal_kthread_lock (void) |
| Lock the task scheduling. | |
| void | osal_kthread_unlock (void) |
| Unlock the task scheduling. | |
| void | osal_kthread_set_affinity (osal_task *task, int cpu_mask) |
| Setting the CPU Affinity of a Task. | |
| int | osal_kthread_should_stop (void) |
| Check whether the thread is running. | |
| void | osal_kthread_destroy (osal_task *task, unsigned int stop_flag) |
| Used to destroy the threads you created. | |
| void | osal_schedule (void) |
| This function put the current task back to the ready queue and try to do the schedule. | |
| void | osal_kthread_suspend (osal_task *task) |
| Suspend a task. | |
| void | osal_kthread_resume (osal_task *task) |
| Resume a task. | |
| void | osal_kthread_schedule (unsigned int sleep_ns) |
| In this state, it cannot be woken up by an external signal and can only be woken up by the kernel itself. | |
| void | osal_kthread_set_uninterrupt (void) |
| Set the current thread to the Task_UNINTERRUPTIBLE state. | |
| void | osal_kthread_set_running (void) |
| Set the current thread status to TASK_RUNNING. | |
| void | osal_cond_resched (void) |
| Programs running in kernel mode can call osal_cond_resched to actively give up CPU resources. | |
| void | osal_yield (void) |
| Pause the current thread. | |
| void | osal_kneon_begin (void) |
| Enabling NEON Algorithm Acceleration. | |
| void | osal_kneon_end (void) |
| Disable NEON Algorithm Acceleration. | |
| long | osal_get_current_tid (void) |
| Obtains the tid of the current thread. | |
| long | osal_get_current_pid (void) |
| Obtains the pid of the current thread. | |
| unsigned long | osal_msleep (unsigned int msecs) |
| sleep. | |
| void | osal_msleep_uninterruptible (unsigned int msecs) |
| sleep safely even with waitqueue interruptions. | |
| void | osal_udelay (unsigned int usecs) |
| spinning-delay in microsecond (us). | |
| void | osal_mdelay (unsigned int msecs) |
| spinning-delay in millisecond (ms). | |
| #define MINIMAL_STACK_SIZE LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE |