comparison vidix/sysdep/pci_mach386.c @ 22900:a9e111b88c4a

merged libdha and libvidix, moved all files from libdha to vidix directory
author ben
date Fri, 06 Apr 2007 15:20:49 +0000
parents libdha/sysdep/pci_mach386.c@4cfb6b9a6da3
children 9c4ad35fabc5
comparison
equal deleted inserted replaced
22899:515545f81186 22900:a9e111b88c4a
1 /*
2 This file is based on:
3 $XFree86: xc/programs/Xserver/hw/xfree86/etc/scanpci.c,v 3.34.2.17 1998/11/10 11:55:40 dawes Exp $
4 Modified for readability by Nick Kurshev
5 */
6
7 #include <errno.h>
8
9 static int io_fd;
10
11 static __inline__ int enable_os_io(void)
12 {
13 io_fd = -1 ;
14 if ((io_fd = open("/dev/iopl", O_RDWR, 0)) < 0) {
15 perror("/dev/iopl");
16 return(errno);
17 }
18 return(0);
19 }
20
21 static __inline__ int disable_os_io(void)
22 {
23 close(io_fd);
24 return(0);
25 }