📄 rtf_create_handler.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_create_handler" "3" .SH "NAME" rtf_create_handler \(em install a handler for realtime fifo data .SH "SYNOPSIS" .PP .nf .ta 8n 16n 24n 32n 40n 48n 56n 64n 72n #include <rtl_fifo.h> int \fBrtf_create_handler\fP(unsigned int \fBfifo\fR, int (* \fBhandler\fR)()); .fi .SH "DESCRIPTION" .PP \fBrtf_create_handler\fP installs a handler which is executed when data is written to or read from a real-time fifo (RT-FIFO) by a user-space process. \fBfifo\fR is an RT-FIFO that must have previously been created with a call to \fBrtf_create\fP. \fBhandler\fR is then called whenever a Linux process accesses that fifo. The handler is executed with the Linux (i.e., lowest) priority. .PP \fBrtf_create_handler\fP is often used in conjunction with rtf_get to process data acquired asynchronously from a Linux process. The installed handler calls \fBrtf_get\fP when data is present. Because the handler is only executed when there is activity on the fifo, polling is not necessary. .PP The RT-FIFO is a mechanism, implemented as a character device, to communicate between realtime software components (either in threads or handlers), and between realtime software and ordinary Linux processes. The rtf_* functions are used in RT mode; 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, 0 is returned. On failure, a negative value is returned as described below. .SH "NOTES" .PP The handler is only called when a Linux process accesses the FIFO. To install a handler that would be called on \fBrtf_put\fP or \fBrtf_get\fP, use \fBrtf_create_rt_handler\fP. .SH "ERRORS" .IP "-EINVAL" 10 \fBfifo\fR is greater than or equal to RTF_NO, or is not a valid RT-FIFO identifier; or \fBhandler\fR is NULL. .SH "SEE ALSO" \fIrtf_create(3) (link to URL rtf_create.3.html) \fR, \fIrtf_create_rt_handler(3) (link to URL rtf_create_rt_handler.3.html) \fR, \fIrtf_destroy(3) (link to URL rtf_destroy.3.html) \fR, \fIrtf_get(3) (link to URL rtf_get.3.html) \fR, \fIrtf_put(3) (link to URL rtf_put.3.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, Wed 13 Jun 2001, 17:58
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -