linuxcnc/docs/man/man3/rtapi_is.3rtapi
2014-07-28 09:29:03 -05:00

50 lines
2.1 KiB
Text

.\" Copyright (c) 2014 Jeff Epler
.\"
.\" This is free documentation; you can redistribute it and/or
.\" modify it under the terms of the GNU General Public License as
.\" published by the Free Software Foundation; either version 2 of
.\" the License, or (at your option) any later version.
.\"
.\" The GNU General Public License's references to "object code"
.\" and "executables" are to be interpreted as the output of any
.\" document formatting or typesetting system, including
.\" intermediate and printed output.
.\"
.\" This manual is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public
.\" License along with this manual; if not, write to the Free
.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
.\" USA.
.TH rtapi_is "3rtapi" "2006-10-12" "LinuxCNC Documentation" "RTAPI"
.SH NAME
rtapi_is \- details of rtapi configuration
.SH SYNTAX
.HP
int rtapi_is_kernelspace()
.HP
int rtapi_is_realtime()
.SH DESCRIPTION
\fBrtapi_is_kernelspace()\fR returns nonzero when rtapi modules run in kernel space (e.g., under rtai) and zero when they
run in userpace (e.g., under uspace).
\fBrtapi_is_realtime()\fR returns nonzero when capable of running with realtime
guarantees. For rtai, this always returns nonzero (but actually loading
realtime modules will fail if not running under the appropriate kernel). For
uspace, this returns nonzero when the running kernel indicates it is capable of
realtime performance. If \fBrtapi_app\fR is not setuid root, this returns nonzero
even though \fBrtapi_app\fR will not be able to obtain realtime scheduling or
hardware access, so e.g., attempting to \fBloadrt\fR a hardware driver will fail.
.SH REALTIME CONSIDERATIONS
May be called from userspace or from realtime setup code.
\fBrtapi_is_realtime()\fR may perform filesystem I/O.
.SH RETURN VALUE
Zero for false, nonzero for true.