Mercurial > mplayer.hg
comparison vidix/sysdep/pci_os2.c @ 29263:0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
author | diego |
---|---|
date | Wed, 13 May 2009 02:58:57 +0000 |
parents | 08d18fe9da52 |
children | 958431e2cde0 |
comparison
equal
deleted
inserted
replaced
29262:7d545a6b8aff | 29263:0f1b5b68af32 |
---|---|
35 { | 35 { |
36 HFILE hfd; | 36 HFILE hfd; |
37 ULONG dlen,action; | 37 ULONG dlen,action; |
38 APIRET rc; | 38 APIRET rc; |
39 static char *ioDrvPath = "/dev/fastio$"; | 39 static char *ioDrvPath = "/dev/fastio$"; |
40 | 40 |
41 if (DosOpen((PSZ)ioDrvPath, (PHFILE)&hfd, (PULONG)&action, | 41 if (DosOpen((PSZ)ioDrvPath, (PHFILE)&hfd, (PULONG)&action, |
42 (ULONG)0, FILE_SYSTEM, FILE_OPEN, | 42 (ULONG)0, FILE_SYSTEM, FILE_OPEN, |
43 OPEN_SHARE_DENYNONE|OPEN_FLAGS_NOINHERIT|OPEN_ACCESS_READONLY, | 43 OPEN_SHARE_DENYNONE|OPEN_FLAGS_NOINHERIT|OPEN_ACCESS_READONLY, |
44 (ULONG)0) != 0) { | 44 (ULONG)0) != 0) { |
45 fprintf(stderr,"Error opening fastio$ driver...\n"); | 45 fprintf(stderr,"Error opening fastio$ driver...\n"); |
46 fprintf(stderr,"Please install xf86sup.sys in config.sys!\n"); | 46 fprintf(stderr,"Please install xf86sup.sys in config.sys!\n"); |
47 return 42; | 47 return 42; |
48 } | 48 } |
49 callgate[0] = callgate[1] = 0; | 49 callgate[0] = callgate[1] = 0; |
50 | 50 |
51 /* Get callgate from driver for fast io to ports and other stuff */ | 51 /* Get callgate from driver for fast io to ports and other stuff */ |
52 | 52 |
53 rc = DosDevIOCtl(hfd, (ULONG)0x76, (ULONG)0x64, | 53 rc = DosDevIOCtl(hfd, (ULONG)0x76, (ULONG)0x64, |
54 NULL, 0, NULL, | 54 NULL, 0, NULL, |
55 (ULONG*)&callgate[2], sizeof(USHORT), &dlen); | 55 (ULONG*)&callgate[2], sizeof(USHORT), &dlen); |
56 if (rc) { | 56 if (rc) { |
57 fprintf(stderr,"xf86-OS/2: EnableIOPorts failed, rc=%d, dlen=%d; emergency exit\n", | 57 fprintf(stderr,"xf86-OS/2: EnableIOPorts failed, rc=%d, dlen=%d; emergency exit\n", |
58 rc,dlen); | 58 rc,dlen); |
59 DosClose(hfd); | 59 DosClose(hfd); |
60 return 42; | 60 return 42; |
61 } | 61 } |
62 | 62 |
63 /* Calling callgate with function 13 sets IOPL for the program */ | 63 /* Calling callgate with function 13 sets IOPL for the program */ |
64 | 64 |
65 __asm__ volatile ("movl $13,%%ebx;.byte 0xff,0x1d;.long _callgate" | 65 __asm__ volatile ("movl $13,%%ebx;.byte 0xff,0x1d;.long _callgate" |
66 : /*no outputs */ | 66 : /*no outputs */ |
67 : /*no inputs */ | 67 : /*no inputs */ |
68 : "eax","ebx","ecx","edx","cc"); | 68 : "eax","ebx","ecx","edx","cc"); |
69 | 69 |
70 DosClose(hfd); | 70 DosClose(hfd); |
71 return 0; | 71 return 0; |
72 } | 72 } |
73 | 73 |
74 static __inline__ int disable_os_io(void) | 74 static __inline__ int disable_os_io(void) |