?? rtf_get.3
字號:
.\" This -*- nroff -*- file has been generated from.\" DocBook SGML with docbook-to-man on Debian GNU/Linux....\"...\" transcript compatibility for postscript use....\"...\" synopsis: .P! <file.ps>...\".de P!\\&..fl \" force out current output buffer\\!%PB\\!/showpage{}def...\" the following is from Ken Flowers -- it prevents dictionary overflows\\!/tempdict 200 dict def tempdict begin.fl \" prolog.sy cat \\$1\" bring in postscript file...\" the following line matches the tempdict above\\!end % tempdict %\\!PE\\!..sp \\$2u \" move below the image...de pF.ie \\*(f1 .ds f1 \\n(.f.el .ie \\*(f2 .ds f2 \\n(.f.el .ie \\*(f3 .ds f3 \\n(.f.el .ie \\*(f4 .ds f4 \\n(.f.el .tm ? font overflow.ft \\$1...de fP.ie !\\*(f4 \{\. ft \\*(f4. ds f4\"' br \}.el .ie !\\*(f3 \{\. ft \\*(f3. ds f3\"' br \}.el .ie !\\*(f2 \{\. ft \\*(f2. ds f2\"' br \}.el .ie !\\*(f1 \{\. ft \\*(f1. ds f1\"' br \}.el .tm ? font underflow...ds f1\".ds f2\".ds f3\".ds f4\"'\" t .ta 8n 16n 24n 32n 40n 48n 56n 64n 72n .TH "rtf_get" "3" .SH "NAME" rtf_get \(em read data from a realtime fifo .SH "SYNOPSIS" .PP .nf .ta 8n 16n 24n 32n 40n 48n 56n 64n 72n #include <rtl_fifo.h> int \fBrtf_get\fP(unsigned int \fBfifo\fR, char * \fBbuf\fR, int \fBcount\fR); .fi .SH "DESCRIPTION" .PP \fBrtf_get\fP reads a block of data from a realtime fifo (RT-FIFO) previously created with a call to \fBrtf_create(3)\fP. \fBfifo\fR is the ID with which the RT-FIFO was created. \fBbuf\fR is the block of data to be filled with the received bytes, while \fBcount\fR is the size of the block in bytes. This mechanism is available only to realtime tasks; Linux processes use a \fBread(2)\fP from the corresponding fifo device to dequeue data from a fifo. Similarly, Linux processes use \fBwrite(2)\fP or similar functions to write the data to be read via \fBrtf_put\fP by a realtime task. .PP \fBrtf_get\fP is often used in conjunction with \fBrtf_create_handler\fP to process data received asynchronously from a Linux process. A handler is installed via \fBrtf_create_handler\fP; this handler calls \fBrtf_get\fP to receive any data present in the RT-FIFO as it becomes available. In this way, polling is not necessary; the handler is called only when data is present in the fifo. .PP The RT-FIFO is a mechanism, implemented as a character device, to communicate between realtime tasks and ordinary Linux processes. The rtf_* functions are used by the realtime tasks; Linux processes use standard character device access functions such as \fBread(2)\fP, \fBwrite(2\fP) and \fBselect(2)\fP. .SH "RETURN VALUE" .PP On success, the size of the received data block is returned. Note that this value may be less then \fBcount\fR if \fBcount\fR bytes are not available in the fifo. On failure, a negative value is returned as described below. .SH "ERRORS" .IP "-ENODEV" 10 \fBfifo\fR is greater than or equal to RTF_NO. .IP "-EINVAL" 10 \fBfifo\fR is not a valid RT-FIFO identifier. .SH "Notes" .PP \fBrtf_get\fP is available in PSC, the user-level real-time signal library. It can be called from handlers installed via \fIrtlinux_sigaction(3) (link to URL rtlinux_sigaction.3.html) \fR. .SH "SEE ALSO" \fIUNIX spec read(2) (link to URL ../susv2/xns/read.html) \fR, \fIrtf_create(3) (link to URL rtf_create.3.html) \fR, \fIrtf_create_handler(3) (link to URL rtf_create_handler.3.html) \fR, \fIrtf_destroy(3) (link to URL rtf_destroy.3.html) \fR, \fIrtf_put(3) (link to URL rtf_put.3.html) \fR, \fIUNIX spec write(2) (link to URL ../susv2/xns/write.html) \fR .PP \(co1997 Jerry Epplin. .PP Modifications for RTLinux 2.x and 3.x by Michael Barabanov. \(co2001 FSMLabs Inc. .PP All rights reserved. ...\" created by instant / docbook-to-man, Thu 26 Jul 2001, 11:19
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -