SOURCES: xorg-driver-video-fglrx-2.6.20-restore_syscalls.patch (NE...

pluto pluto at pld-linux.org
Mon Feb 19 10:50:34 CET 2007


Author: pluto                        Date: Mon Feb 19 09:50:34 2007 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- a big hackkkkkkkk. use carefully...

---- Files affected:
SOURCES:
   xorg-driver-video-fglrx-2.6.20-restore_syscalls.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/xorg-driver-video-fglrx-2.6.20-restore_syscalls.patch
diff -u /dev/null SOURCES/xorg-driver-video-fglrx-2.6.20-restore_syscalls.patch:1.1
--- /dev/null	Mon Feb 19 10:50:34 2007
+++ SOURCES/xorg-driver-video-fglrx-2.6.20-restore_syscalls.patch	Mon Feb 19 10:50:29 2007
@@ -0,0 +1,73 @@
+--- xorg-driver-video-fglrx-8.33.6/common/lib/modules/fglrx/build_mod/firegl_public.c.orig	2007-01-09 12:26:33.000000000 +0100
++++ xorg-driver-video-fglrx-8.33.6/common/lib/modules/fglrx/build_mod/firegl_public.c	2007-01-31 02:06:52.539021699 +0100
+@@ -194,6 +194,70 @@
+ int errno;
+ #endif // __ia64__
+ 
++#if defined(__i386__)
++#define __syscall_return(type, res) \
++do { \
++ if ((unsigned long)(res) >= (unsigned long)(-(128 + 1))) { \
++ errno = -(res); \
++ res = -1; \
++ } \
++ return (type) (res); \
++} while (0)
++#define _syscall2(type,name,type1,arg1,type2,arg2) \
++type name(type1 arg1,type2 arg2) \
++{ \
++long __res; \
++__asm__ volatile ("push %%ebx ; movl %2,%%ebx ; int $0x80 ; pop %%ebx" \
++ : "=a" (__res) \
++ : "0" (__NR_##name),"ri" ((long)(arg1)),"c" ((long)(arg2)) \
++ : "memory"); \
++__syscall_return(type,__res); \
++}
++
++#define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \
++type name(type1 arg1,type2 arg2,type3 arg3) \
++{ \
++long __res; \
++__asm__ volatile ("push %%ebx ; movl %2,%%ebx ; int $0x80 ; pop %%ebx" \
++ : "=a" (__res) \
++ : "0" (__NR_##name),"ri" ((long)(arg1)),"c" ((long)(arg2)), \
++ "d" ((long)(arg3)) : "memory"); \
++__syscall_return(type,__res); \
++}
++#elif defined(__x86_64__)
++#define __syscall_clobber "r11","rcx","memory"
++#define __syscall "syscall"
++
++#define __syscall_return(type, res) \
++do { \
++ if ((unsigned long)(res) >= (unsigned long)(-127)) { \
++ errno = -(res); \
++ res = -1; \
++ } \
++ return (type) (res); \
++} while (0)
++#define _syscall2(type,name,type1,arg1,type2,arg2) \
++type name(type1 arg1,type2 arg2) \
++{ \
++long __res; \
++__asm__ volatile (__syscall \
++ : "=a" (__res) \
++ : "0" (__NR_##name),"D" ((long)(arg1)),"S" ((long)(arg2)) : __syscall_clobber ); \
++__syscall_return(type,__res); \
++}
++
++#define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \
++type name(type1 arg1,type2 arg2,type3 arg3) \
++{ \
++long __res; \
++__asm__ volatile (__syscall \
++ : "=a" (__res) \
++ : "0" (__NR_##name),"D" ((long)(arg1)),"S" ((long)(arg2)), \
++ "d" ((long)(arg3)) : __syscall_clobber); \
++__syscall_return(type,__res); \
++}
++#endif
++
+ // int mlock(const void *addr, size_t len);
+ _syscall2(int, mlock, const void *, addr, size_t, len )
+ // int munlock(const void *addr, size_t len);
================================================================


More information about the pld-cvs-commit mailing list