Alexandre Julliard : libwine: Use the syscall function instead of inline assembly.
Alexandre Julliard
julliard at winehq.org
Thu Dec 23 11:28:06 CST 2010
Module: wine
Branch: master
Commit: 378df94ef8f4fa5ca254c1aca408283342b25b16
URL: http://source.winehq.org/git/wine.git/?a=commit;h=378df94ef8f4fa5ca254c1aca408283342b25b16
Author: Alexandre Julliard <julliard at winehq.org>
Date: Thu Dec 23 17:07:35 2010 +0100
libwine: Use the syscall function instead of inline assembly.
---
libs/wine/ldt.c | 26 ++------------------------
1 files changed, 2 insertions(+), 24 deletions(-)
diff --git a/libs/wine/ldt.c b/libs/wine/ldt.c
index d56790f..c4dcb0e 100644
--- a/libs/wine/ldt.c
+++ b/libs/wine/ldt.c
@@ -70,34 +70,12 @@ static inline void fill_modify_ldt_struct( struct modify_ldt_s *ptr, const LDT_E
static inline int modify_ldt( int func, struct modify_ldt_s *ptr, unsigned long count )
{
- int res;
- __asm__ __volatile__( "pushl %%ebx\n\t"
- "movl %2,%%ebx\n\t"
- "int $0x80\n\t"
- "popl %%ebx"
- : "=a" (res)
- : "0" (SYS_modify_ldt),
- "r" (func),
- "c" (ptr),
- "d" (count),
- "m" (*ptr) );
- if (res >= 0) return res;
- errno = -res;
- return -1;
+ return syscall( SYS_modify_ldt, func, ptr, count );
}
static inline int set_thread_area( struct modify_ldt_s *ptr )
{
- int res;
- __asm__ __volatile__( "pushl %%ebx\n\t"
- "movl %3,%%ebx\n\t"
- "int $0x80\n\t"
- "popl %%ebx"
- : "=a" (res), "=m" (*ptr)
- : "0" (243) /* SYS_set_thread_area */, "q" (ptr), "m" (*ptr) );
- if (res >= 0) return res;
- errno = -res;
- return -1;
+ return syscall( 243 /* SYS_set_thread_area */, ptr );
}
#endif /* linux */
More information about the wine-cvs
mailing list