Back to index

glibc  2.9
Defines | Functions
io.h File Reference
#include <features.h>

Go to the source code of this file.

Defines

#define inb   _inb
#define inw   _inw
#define inl   _inl
#define outb   _outb
#define outw   _outw
#define outl   _outl

Functions

__BEGIN_DECLS int ioperm (unsigned long int __from, unsigned long int __num, int __turn_on)
int iopl (int __level)
unsigned int _inb (unsigned long int __port)
unsigned int _inw (unsigned long int __port)
unsigned int _inl (unsigned long int __port)
void _outb (unsigned char __val, unsigned long int __port)
void _outw (unsigned short __val, unsigned long int __port)
void _outl (unsigned int __val, unsigned long int __port)
int pciconfig_read (unsigned long int __bus, unsigned long int __dfn, unsigned long int __off, unsigned long int __len, unsigned char *__buf)
int pciconfig_write (unsigned long int __bus, unsigned long int __dfn, unsigned long int __off, unsigned long int __len, unsigned char *__buf)

Define Documentation

#define inb   _inb

Definition at line 50 of file io.h.

#define inl   _inl

Definition at line 52 of file io.h.

#define inw   _inw

Definition at line 51 of file io.h.

#define outb   _outb

Definition at line 53 of file io.h.

#define outl   _outl

Definition at line 55 of file io.h.

#define outw   _outw

Definition at line 54 of file io.h.


Function Documentation

unsigned int _inb ( unsigned long int  __port)

Definition at line 254 of file ioperm.c.

{
  return *((volatile unsigned char *)(IO_ADDR (port)));
}

Here is the call graph for this function:

unsigned int _inl ( unsigned long int  __port)

Definition at line 268 of file ioperm.c.

{
  return *((volatile unsigned long *)(IO_ADDR (port)));
}

Here is the call graph for this function:

unsigned int _inw ( unsigned long int  __port)

Definition at line 261 of file ioperm.c.

{
  return *((volatile unsigned short *)(IO_ADDR (port)));
}

Here is the call graph for this function:

void _outb ( unsigned char  __val,
unsigned long int  __port 
)

Definition at line 233 of file ioperm.c.

{
  *((volatile unsigned char *)(IO_ADDR (port))) = b;
}

Here is the call graph for this function:

void _outl ( unsigned int  __val,
unsigned long int  __port 
)

Definition at line 247 of file ioperm.c.

{
  *((volatile unsigned long *)(IO_ADDR (port))) = b;
}

Here is the call graph for this function:

void _outw ( unsigned short  __val,
unsigned long int  __port 
)

Definition at line 240 of file ioperm.c.

{
  *((volatile unsigned short *)(IO_ADDR (port))) = b;
}

Here is the call graph for this function:

__BEGIN_DECLS int ioperm ( unsigned long int  __from,
unsigned long int  __num,
int  __turn_on 
)

Definition at line 25 of file ioperm.c.

{
#if ! HAVE_I386_IO_PERM_MODIFY
  return __hurd_fail (ENOSYS);
#else
  error_t err;
  device_t devmaster;

  /* With the device master port we get a capability that represents
     this range of io ports.  */
  err = __get_privileged_ports (NULL, &devmaster);
  if (! err)
    {
      io_perm_t perm;
      err = __i386_io_perm_create (devmaster, from, from + num - 1, &perm);
      __mach_port_deallocate (__mach_task_self (), devmaster);
      if (! err)
       {
         /* Now we add or remove that set from our task's bitmap.  */
         err = __i386_io_perm_modify (__mach_task_self (), perm, turn_on);
         __mach_port_deallocate (__mach_task_self (), perm);
       }

      if (err == MIG_BAD_ID)       /* Old kernels don't have these RPCs.  */
       err = ENOSYS;
    }

  return err ? __hurd_fail (err) : 0;
#endif
}
int iopl ( int  __level)
int pciconfig_read ( unsigned long int  __bus,
unsigned long int  __dfn,
unsigned long int  __off,
unsigned long int  __len,
unsigned char *  __buf 
)
int pciconfig_write ( unsigned long int  __bus,
unsigned long int  __dfn,
unsigned long int  __off,
unsigned long int  __len,
unsigned char *  __buf 
)