![Keil RTX51 Скачать руководство пользователя страница 29](http://html1.mh-extra.com/html/keil/rtx51/rtx51_manual_3913946029.webp)
RTX Tiny
29
4
os_create_task
Summary:
#include <rtx51tny.h>
char os_create_task
(
unsigned char
task_id
);
/*
ID
of task to start */
Description:
The
os_create_task
function starts the defined task function using
the task number specified by
task_id
. The task is marked as ready
and is executed according to the rules specified for RTX51 Tiny.
Return Value:
The
os_create_task
function returns a value of 0 if the task was
successfully started. A value of -1 is returned if the task could not
be started or if no task was defined using the specified task number.
See Also:
os_delete_task
Example:
#include <rtx51tny.h>
#include <stdio.h>
/* for printf */
void new_task (void) _task_ 2
{
.
.
.
}
void tst_os_create_task (void) _task_ 0
{
.
.
.
if (os_create_task (2))
{
printf ("Couldn't start task 2\n");
}
.
.
}
Содержание RTX51
Страница 4: ......
Страница 6: ......
Страница 20: ......
Страница 24: ......
Страница 39: ...RTX Tiny 39 4...
Страница 40: ......
Страница 44: ...44 RTX51 Tiny Specifications 5...
Страница 68: ...RTX51 TINY REAL TIME OPERATING SYSTEM User s Guide 2 95...