Annotation of /trunk/ati-drivers/patches/fglrx-2.6.20.patch
Parent Directory | Revision Log
Revision 144 -
(hide annotations)
(download)
Tue May 8 20:06:05 2007 UTC (17 years ago) by niro
File size: 2919 byte(s)
Tue May 8 20:06:05 2007 UTC (17 years ago) by niro
File size: 2919 byte(s)
-import
1 | niro | 144 | --- ATi/common/lib/modules/fglrx/build_mod/firegl_public.c 2006-12-18 10:58:15.000000000 -0500 |
2 | +++ common/lib/modules/fglrx/build_mod/firegl_public.c 2006-12-18 11:14:04.000000000 -0500 | ||
3 | @@ -181,6 +181,70 @@ | ||
4 | int errno; | ||
5 | #endif // __ia64__ | ||
6 | |||
7 | +#if defined(__i386__) | ||
8 | +#define __syscall_return(type, res) \ | ||
9 | +do { \ | ||
10 | + if ((unsigned long)(res) >= (unsigned long)(-(128 + 1))) { \ | ||
11 | + errno = -(res); \ | ||
12 | + res = -1; \ | ||
13 | + } \ | ||
14 | + return (type) (res); \ | ||
15 | +} while (0) | ||
16 | +#define _syscall2(type,name,type1,arg1,type2,arg2) \ | ||
17 | +type name(type1 arg1,type2 arg2) \ | ||
18 | +{ \ | ||
19 | +long __res; \ | ||
20 | +__asm__ volatile ("push %%ebx ; movl %2,%%ebx ; int $0x80 ; pop %%ebx" \ | ||
21 | + : "=a" (__res) \ | ||
22 | + : "0" (__NR_##name),"ri" ((long)(arg1)),"c" ((long)(arg2)) \ | ||
23 | + : "memory"); \ | ||
24 | +__syscall_return(type,__res); \ | ||
25 | +} | ||
26 | + | ||
27 | +#define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \ | ||
28 | +type name(type1 arg1,type2 arg2,type3 arg3) \ | ||
29 | +{ \ | ||
30 | +long __res; \ | ||
31 | +__asm__ volatile ("push %%ebx ; movl %2,%%ebx ; int $0x80 ; pop %%ebx" \ | ||
32 | + : "=a" (__res) \ | ||
33 | + : "0" (__NR_##name),"ri" ((long)(arg1)),"c" ((long)(arg2)), \ | ||
34 | + "d" ((long)(arg3)) : "memory"); \ | ||
35 | +__syscall_return(type,__res); \ | ||
36 | +} | ||
37 | +#elif defined(__x86_64__) | ||
38 | +#define __syscall_clobber "r11","rcx","memory" | ||
39 | +#define __syscall "syscall" | ||
40 | + | ||
41 | +#define __syscall_return(type, res) \ | ||
42 | +do { \ | ||
43 | + if ((unsigned long)(res) >= (unsigned long)(-127)) { \ | ||
44 | + errno = -(res); \ | ||
45 | + res = -1; \ | ||
46 | + } \ | ||
47 | + return (type) (res); \ | ||
48 | +} while (0) | ||
49 | +#define _syscall2(type,name,type1,arg1,type2,arg2) \ | ||
50 | +type name(type1 arg1,type2 arg2) \ | ||
51 | +{ \ | ||
52 | +long __res; \ | ||
53 | +__asm__ volatile (__syscall \ | ||
54 | + : "=a" (__res) \ | ||
55 | + : "0" (__NR_##name),"D" ((long)(arg1)),"S" ((long)(arg2)) : __syscall_clobber ); \ | ||
56 | +__syscall_return(type,__res); \ | ||
57 | +} | ||
58 | + | ||
59 | +#define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \ | ||
60 | +type name(type1 arg1,type2 arg2,type3 arg3) \ | ||
61 | +{ \ | ||
62 | +long __res; \ | ||
63 | +__asm__ volatile (__syscall \ | ||
64 | + : "=a" (__res) \ | ||
65 | + : "0" (__NR_##name),"D" ((long)(arg1)),"S" ((long)(arg2)), \ | ||
66 | + "d" ((long)(arg3)) : __syscall_clobber); \ | ||
67 | +__syscall_return(type,__res); \ | ||
68 | +} | ||
69 | +#endif | ||
70 | + | ||
71 | // int mlock(const void *addr, size_t len); | ||
72 | _syscall2(int, mlock, const void *, addr, size_t, len ) | ||
73 | // int munlock(const void *addr, size_t len); | ||
74 | --- ATi/common/lib/modules/fglrx/build_mod/firegl_public.c 2007-02-20 19:23:07.000000000 +0100 | ||
75 | +++ ATi/common/lib/modules/fglrx/build_mod/firegl_public.c.new 2007-02-21 23:36:19.000000000 +0100 | ||
76 | @@ -5265,7 +5265,7 @@ | ||
77 | kasThread_t* thread_obj = (kasThread_t*)hThread; | ||
78 | init_MUTEX(&(thread_obj->sleep_finished)); | ||
79 | init_waitqueue_head(&(thread_obj->wq_head)); | ||
80 | - INIT_WORK(&(thread_obj->work), routine, pcontext); | ||
81 | + INIT_WORK(&(thread_obj->work), routine); | ||
82 | schedule_work(&(thread_obj->work)); | ||
83 | return 1; | ||
84 | } |