Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
e8c5e2b8
Commit
e8c5e2b8
authored
Jun 06, 2010
by
Maarten Lankhorst
Committed by
Alexandre Julliard
Jul 22, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Use syscall instead of int $0x80.
parent
c054b5f8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
18 deletions
+10
-18
critsection.c
dlls/ntdll/critsection.c
+8
-16
server.c
dlls/ntdll/server.c
+2
-2
No files found.
dlls/ntdll/critsection.c
View file @
e8c5e2b8
...
...
@@ -60,26 +60,18 @@ static inline void small_pause(void)
static
inline
int
futex_wait
(
int
*
addr
,
int
val
,
struct
timespec
*
timeout
)
{
int
res
;
__asm__
__volatile__
(
"xchgl %2,%%ebx
\n\t
"
"int $0x80
\n\t
"
"xchgl %2,%%ebx"
:
"=a"
(
res
)
:
"0"
(
240
)
/* SYS_futex */
,
"D"
(
addr
),
"c"
(
0
)
/* FUTEX_WAIT */
,
"d"
(
val
),
"S"
(
timeout
)
);
return
res
;
int
ret
=
syscall
(
240
/*SYS_futex*/
,
addr
,
0
/*FUTEX_WAIT*/
,
val
,
timeout
,
0
,
0
);
if
(
ret
<
0
)
return
-
errno
;
return
ret
;
}
static
inline
int
futex_wake
(
int
*
addr
,
int
val
)
{
int
res
;
__asm__
__volatile__
(
"xchgl %2,%%ebx
\n\t
"
"int $0x80
\n\t
"
"xchgl %2,%%ebx"
:
"=a"
(
res
)
:
"0"
(
240
)
/* SYS_futex */
,
"D"
(
addr
),
"c"
(
1
)
/* FUTEX_WAKE */
,
"d"
(
val
)
);
return
res
;
int
ret
=
syscall
(
240
/*SYS_futex*/
,
addr
,
1
/*FUTEX_WAKE*/
,
val
,
NULL
,
0
,
0
);
if
(
ret
<
0
)
return
-
errno
;
return
ret
;
}
static
inline
int
use_futexes
(
void
)
...
...
dlls/ntdll/server.c
View file @
e8c5e2b8
...
...
@@ -947,9 +947,9 @@ static int get_unix_tid(void)
{
int
ret
=
-
1
;
#if defined(linux) && defined(__i386__)
__asm__
(
"int $0x80"
:
"=a"
(
ret
)
:
"0"
(
224
)
/* SYS_gettid
*/
);
ret
=
syscall
(
224
/*SYS_gettid
*/
);
#elif defined(linux) && defined(__x86_64__)
__asm__
(
"syscall"
:
"=a"
(
ret
)
:
"0"
(
186
)
/* SYS_gettid
*/
);
ret
=
syscall
(
186
/*SYS_gettid
*/
);
#elif defined(__sun)
ret
=
pthread_self
();
#elif defined(__APPLE__)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment