rtapi_io(3rtapi)

rtapi_io3rtapi

Rtapi wrappers for linux kernel functionality

Usage

#include <rtapi_io.h>

unsigned char rtapi_inb(unsigned short int port);

unsigned short rtapi_inw(unsigned short int port);

unsigned int rtapi_inl(unsigned short int port);

unsigned void rtapi_outb(unsigned char value, unsigned short int port);

unsigned void rtapi_outw(unsigned short value, unsigned short int port);

unsigned void rtapi_inl(unsigned int value, unsigned short int port);

int rtapi_ioperm(unsigned long from, unsigned long num, int turn_on);

unsigned void rtapi_outl(unsigned int value, unsigned short int port);

Overview

In kernel space, each rtapi_xxx or RTAPI_XXX identifier is mapped to the underlying kernel functionality, if available.

In userspace, or in kernels where the underlying functionality is not provided by a kernel, generally another implementation--possibly with reduced functionality--is provided. (For example, the userspace implementation for rtapi_device_register and the kernel space implementation of rtapi_ioperm always succeeds)

Realtime considerations

Call from init/cleanup code and from realtime tasks. These functions will cause illegal instruction exceptions in non-realtime components, as well as in uspace rtapi_app when it is not setuid root.

Return value

As in Linux.

Releases

2 releases since Debian 12 (Bookworm); the text changed 1 time.

  1. 12
  2. 13

Author

Jeff Epler

From linuxcnc-uspace-dev 1:2.9.4-2+deb13u1 in Debian 13 (Trixie). Parsed by carta from the page's man source.