File: rtf_put.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 (90 lines) | stat: -rw-r--r-- 2,741 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
.\"
.\" 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 RTF_PUT 2 "11 July 1997" "Real-Time Linux" "Real-Time Linux"
.SH NAME
rtf_put \- write data to a real-time fifo
.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 rtf_put(unsigned int " fifo ", char * " buf ", int " count ");
.SH DESCRIPTION
.B rtf_put
writes a block of data to a real-time fifo (RT-FIFO) previously created
with a call to 
.BR rtf_create (2) .
.I fifo
is the ID with which the RT-FIFO was created.
.I buf
is the block of data to be written, while 
.I count
is the size of the block in bytes.  This mechanism is available only to 
real-time tasks; Linux processes use a
.B write (2)
to the corresponding fifo device to enqueue data to a fifo.  Similarly,
Linux processes use 
.B read (2)
or similar functions to read the data previously written via
.B rtf_put
by a real-time task.
.PP
The RT-FIFO is a mechanism, implemented as a character device, to
communicate between real-time tasks and ordinary Linux processes.  The
rtf_* functions are used by the real-time tasks; Linux processes use
standard character device access functions such as
.BR read(2) ,
.BR write(2) ,
and
.BR select(2) .
.SH "RETURN VALUE"
On success, 
.I size
is returned.  On failure, -1 is returned, and
.I errno
is set as described below.
.SH ERRORS
.IP \fB-ENODEV\fP
.I fifo
is greater than or equal to RTF_NO.
.IP \fB-EINVAL\fP
.I fifo
is not a valid RT-FIFO identifier.
.IP \fB-ENOSPC\fP
insufficient space is available in the RT-FIFO for 
.I count
bytes.
.SH "SEE ALSO"
.BR read (2),
.BR rtf_create (2), 
.BR rtf_create_handler (2), 
.BR rtf_destroy (2), 
.BR rtf_get (2), 
.BR rtf_resize (2), 
.BR write (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.