Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
a51aaf89
Commit
a51aaf89
authored
Oct 08, 2011
by
Charles Davis
Committed by
Alexandre Julliard
Oct 10, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Use syscall(2) instead of inline assembly on Mac OS, too.
parent
269fe5a4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
20 deletions
+4
-20
mach.c
server/mach.c
+4
-20
No files found.
server/mach.c
View file @
a51aaf89
...
...
@@ -29,6 +29,9 @@
#include <stdarg.h>
#include <sys/types.h>
#include <unistd.h>
#ifdef HAVE_SYS_SYSCALL_H
#include <sys/syscall.h>
#endif
#include "ntstatus.h"
#define WIN32_NO_STATUS
...
...
@@ -47,21 +50,6 @@
#include <mach/thread_act.h>
#include <servers/bootstrap.h>
#if defined(__APPLE__) && defined(__i386__)
extern
int
pthread_kill_syscall
(
mach_port_t
,
int
);
__ASM_GLOBAL_FUNC
(
pthread_kill_syscall
,
"movl $328,%eax
\n\t
"
/* SYS___pthread_kill */
"int $0x80
\n\t
"
"jae 1f
\n\t
"
"negl %eax
\n
"
"1:
\t
ret"
)
#else
static
inline
int
pthread_kill_syscall
(
mach_port_t
,
int
)
{
return
-
ENOSYS
;
}
#endif
static
mach_port_t
server_mach_port
;
void
sigchld_callback
(
void
)
...
...
@@ -268,11 +256,7 @@ int send_thread_signal( struct thread *thread, int sig )
if
(
!
mach_port_extract_right
(
process_port
,
thread
->
unix_tid
,
MACH_MSG_TYPE_COPY_SEND
,
&
port
,
&
type
))
{
if
((
ret
=
pthread_kill_syscall
(
port
,
sig
))
<
0
)
{
errno
=
-
ret
;
ret
=
-
1
;
}
ret
=
syscall
(
SYS___pthread_kill
,
port
,
sig
);
mach_port_deallocate
(
mach_task_self
(),
port
);
}
else
errno
=
ESRCH
;
...
...
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