man rt_task_init () - create a realtime task

NAME

rt_task_init - create a realtime task

SYNOPSIS

WARNING -- 
This is an RTLinux v1.x compatibility function. 
For new programs, please see pthread_create(3). 
 
#define MODULE 
#include <linux/module.h> 
#include <linux/kernel.h> 
#include <linux/version.h> 
#include <linux/errno.h> 
#include <linux/rtf.h> 
#include <asm/rt_irq.h> 
 
int rt_task_init(RT_TASK *task, void (*fn)(int data), int data, int stack_size, int priority); 

WARNING

This is an RTLinux v1.x compatibility function. For new programs, please see pthread_create(3).

DESCRIPTION

rt_task_init creates a realtime task. task is a structure the space for which must be provided by the application. task must be present during the lifetime of the realtime task; thus it cannot be an automatic variable. fn is the entry point of the new task. The parent task can send a one-integer value data to the new task. stack_size is the size of the stack to be used by the new task, and priority is the priority to be given the task. The highest priority is 1, while the lowest is RT_LOWEST_PRIORITY.

The newly created real-time task is initially dormant. It is normally made active by a call to rt_task_make_periodic.

RETURN VALUE

On success, 0 is returned. On failure, a negative value is returned as described below.

ERRORS

-EINVAL
task is already in use by another task.
-ENOMEM
space could not be allocated for the realtime task.

AUTHOR

Jerry Epplin, modified by Michael Barabanov (baraban@fsmlabs.com (link to URL mailto:baraban@fs mlabs.com) )

SEE ALSO

rt_task_delete(3) (link to URL rt_task_delete.3.html) , rt_task_make_periodic(3) (link to URL rt_task_make_periodic.3.html) , rt_task_suspend(3) (link to URL rt_task_suspend.3.html) , rt_task_wait(3) (link to URL rt_task_wait.3.html) , pthread_create(3) (link to URL pthread_create.3.html)

©1997 Jerry Epplin.

Modifications for RTLinux 2.x and 3.x by Michael Barabanov. ©2001 FSMLabs Inc.

All rights reserved.