Tenok
A Linux-like Real-Time Operating System for Robotics and Internet of Things
Functions
kthread.h File Reference
#include <kernel/task.h>
Include dependency graph for kthread.h:

Go to the source code of this file.

Functions

int kthread_create (task_func_t task_func, uint8_t priority, int stack_size)
 Create new kernel thread. More...
 

Function Documentation

◆ kthread_create()

int kthread_create ( task_func_t  task_func,
uint8_t  priority,
int  stack_size 
)

Create new kernel thread.

Parameters
task_funcTask function to run.
priorityPriority of the kernel thread.
stack_sizeStack size of the kernel thread.
Return values
intThe function returns positive task PID on success; otherwise it returns a negative error number.