SysIoAccess

From WhitixDoc

Jump to: navigation, search

SysIoAccess enables or disables access to the I/O port space by the process.

Contents

Syntax

int SysIoAccess(
    int on
)

Parameters

  • on. Whether the process is allowed to access I/O ports. 1 enables I/O port access, 0 disables it.

Returns

0 if the call was successful.

If the system call was not successful, one of the standard error codes is returned.

Example

SysIoAccess(1);
inb(0x80);
/* ... */

Remarks

On the i386 architecture, SysIoAccess sets the I/O privilege level (in the EFLAGS register) to 3 for the current process.


Personal tools