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
b3fb3a67
Commit
b3fb3a67
authored
Mar 05, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Replace use of internal __pthread_kill() function by a system call.
parent
1767b455
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
2 deletions
+20
-2
mach.c
server/mach.c
+20
-2
No files found.
server/mach.c
View file @
b3fb3a67
...
...
@@ -20,6 +20,7 @@
*/
#include "config.h"
#include "wine/port.h"
#include <assert.h>
#include <errno.h>
...
...
@@ -46,7 +47,20 @@
#include <mach/thread_act.h>
#include <servers/bootstrap.h>
extern
int
__pthread_kill
(
mach_port_t
,
int
);
#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
;
...
...
@@ -232,7 +246,11 @@ 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
))
{
ret
=
__pthread_kill
(
port
,
sig
);
if
((
ret
=
pthread_kill_syscall
(
port
,
sig
))
<
0
)
{
errno
=
-
ret
;
ret
=
-
1
;
}
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