mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-06 02:28:19 +00:00
libwine: Use the syscall function instead of inline assembly.
This commit is contained in:
parent
37ae7a533c
commit
378df94ef8
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue