附:常用系统调用
1.taskSpawn 创建(产生并激活)新任务
int taskSpawn
(
char *name, /*新任务名称*/
int priority, /*任务的优先级*/
int options, /*任务可选项*/
int stackSize, /*任务堆栈大小*/
FUNCPTR entryPt, /*任务入口函数*/
int arg1, /*任务入口函数所带参数1~10*/
int arg2, int arg3,
int arg4, int arg5,
int arg6, int arg7,
int arg8, int arg9,
int arg10
)
函数运行成功返回任务ID号,否则为ERROR。
任务可选项的几种模式如下表:
名 称 |
值 |
描 述 |
VX_FP_TASK VX_NO_STACK_FILL VX_PRIVATE_ENV VX_UNBREAKABLE VX_SUPERVISOR_MODE |
0x8 0x100 0x80 |