File: rt_task_init.2

package info (click to toggle)
rtlinux-doc 1.0-2
  • links: PTS
  • area: main
  • in suites: potato, woody
  • size: 96 kB
  • sloc: makefile: 40
file content (73 lines) | stat: -rw-r--r-- 2,467 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
.\"
.\" Copyright (C) 1997 Jerry Epplin.  All rights reserved.
.\"
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice are
.\" preserved on all copies.
.\"
.\" Permission is granted to copy and distribute modified versions of this
.\" manual under the conditions for verbatim copying, provided that the
.\" entire resulting derived work is distributed under the terms of a
.\" permission notice identical to this one
.\" 
.\" The author assumes no responsibility for errors or omissions, or for
.\" damages resulting from the use of the information contained herein.
.\" 
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
.\"
.TH RT_TASK_INIT 2 "11 July 1997" "Real-Time Linux" "Real-Time Linux"
.SH NAME
rt_task_init \- create a real-time task
.SH SYNOPSIS
.nf
.B #define MODULE
.B #include <linux/module.h> 
.B #include <linux/kernel.h> 
.B #include <linux/version.h> 
.B #include <linux/errno.h> 
.B #include <linux/rtf.h> 
.fi
.sp
.BI "int rt_task_init(RT_TASK * " task ", void (*" fn ")(int " data "), int " data ", int " stack_size ", int " priority ");
.SH DESCRIPTION
.B rt_task_init
creates a real-time task.
.I task
is a structure the space for which must be provided by the application.
.I task
must be present during the lifetime of the real-time task; thus it cannot
be an automatic variable.
.I fn
is the entry point of the new task.  The parent task can send a one-integer
value
.I data
to the new task.
.I stack_size
is the size of the stack to be used by the new task, and 
.I priority
is the priority to be given the task.  The highest priority is 1, while
the lowest is RT_LOWEST_PRIORITY.
.PP
The newly created real-time task is initially dormant.  It is normally
made active by a call to 
.BR rt_task_make_periodic .
.SH "RETURN VALUE"
On success, 0 is returned.  On failure, a negative value is returned
as described below.
.SH ERRORS
.IP \fB-EINVAL\fP
.I task
is already in use by another task.
.IP \fB-ENOMEM\fP
space could not be allocated for the real-time task.
.SH "SEE ALSO"
.BR rt_task_delete (2), 
.BR rt_task_make_periodic (2), 
.BR rt_task_suspend (2), 
.BR rt_task_wait (2)
.SH AUTHOR
This manual page was written by Jerry Epplin. 
.P
Copyright (C) 1997 Jerry Epplin, placed under the GNU General Public
License, see the file copyright for details.