diff --git a/include/sys/io.h b/include/sys/io.h new file mode 100644 index 0000000000000000000000000000000000000000..a6ba467431a28c525e11a77c1be638906bfff0da --- /dev/null +++ b/include/sys/io.h @@ -0,0 +1,13 @@ +#ifndef _SYS_IO_H +#define _SYS_IO_H +#ifdef __cplusplus +extern "C" { +#endif + +int ioperm(unsigned long, unsigned long, int); +int iopl(int); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/src/linux/ioperm.c b/src/linux/ioperm.c new file mode 100644 index 0000000000000000000000000000000000000000..6d7c37d0828e578fe45c10748bc123e200deb595 --- /dev/null +++ b/src/linux/ioperm.c @@ -0,0 +1,9 @@ +#include +#include "syscall.h" + +#ifdef SYS_ioperm +int ioperm(unsigned long from, unsigned long num, int turn_on) +{ + return syscall(SYS_ioperm, from, num, turn_on); +} +#endif diff --git a/src/linux/iopl.c b/src/linux/iopl.c new file mode 100644 index 0000000000000000000000000000000000000000..5a626e16ea090ff962475dd213cefe11113418f6 --- /dev/null +++ b/src/linux/iopl.c @@ -0,0 +1,9 @@ +#include +#include "syscall.h" + +#ifdef SYS_iopl +int iopl(int level) +{ + return syscall(SYS_iopl, level); +} +#endif