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
7dbd1f01
Commit
7dbd1f01
authored
Apr 10, 2006
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Moved the tkill function to ptrace.c.
parent
d8659a97
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
31 additions
and
69 deletions
+31
-69
context_alpha.c
server/context_alpha.c
+0
-8
context_i386.c
server/context_i386.c
+0
-28
context_powerpc.c
server/context_powerpc.c
+0
-8
context_sparc.c
server/context_sparc.c
+0
-8
context_x86_64.c
server/context_x86_64.c
+0
-16
ptrace.c
server/ptrace.c
+31
-0
thread.h
server/thread.h
+0
-1
No files found.
server/context_alpha.c
View file @
7dbd1f01
...
...
@@ -334,14 +334,6 @@ void *get_thread_ip( struct thread *thread )
return
(
void
*
)
context
.
Fir
;
}
/* send a signal to a specific thread */
int
tkill
(
int
tgid
,
int
pid
,
int
sig
)
{
/* FIXME: should do something here */
errno
=
ENOSYS
;
return
-
1
;
}
/* retrieve the thread context */
void
get_thread_context
(
struct
thread
*
thread
,
CONTEXT
*
context
,
unsigned
int
flags
)
{
...
...
server/context_i386.c
View file @
7dbd1f01
...
...
@@ -550,34 +550,6 @@ void *get_thread_ip( struct thread *thread )
return
(
void
*
)
context
.
Eip
;
}
/* send a signal to a specific thread */
int
tkill
(
int
tgid
,
int
pid
,
int
sig
)
{
#ifdef __linux__
int
ret
;
__asm__
(
"pushl %%ebx
\n\t
"
"movl %2,%%ebx
\n\t
"
"int $0x80
\n\t
"
"popl %%ebx
\n\t
"
:
"=a"
(
ret
)
:
"0"
(
270
)
/*SYS_tgkill*/
,
"r"
(
tgid
),
"c"
(
pid
),
"d"
(
sig
)
);
if
(
ret
==
-
ENOSYS
)
__asm__
(
"pushl %%ebx
\n\t
"
"movl %2,%%ebx
\n\t
"
"int $0x80
\n\t
"
"popl %%ebx
\n\t
"
:
"=a"
(
ret
)
:
"0"
(
238
)
/*SYS_tkill*/
,
"r"
(
pid
),
"c"
(
sig
)
);
if
(
ret
>=
0
)
return
ret
;
errno
=
-
ret
;
return
-
1
;
#else
errno
=
ENOSYS
;
return
-
1
;
#endif
}
/* retrieve the thread context */
void
get_thread_context
(
struct
thread
*
thread
,
CONTEXT
*
context
,
unsigned
int
flags
)
{
...
...
server/context_powerpc.c
View file @
7dbd1f01
...
...
@@ -273,14 +273,6 @@ void *get_thread_ip( struct thread *thread )
return
(
void
*
)
context
.
Iar
;
}
/* send a signal to a specific thread */
int
tkill
(
int
tgid
,
int
pid
,
int
sig
)
{
/* FIXME: should do something here */
errno
=
ENOSYS
;
return
-
1
;
}
/* retrieve the thread context */
void
get_thread_context
(
struct
thread
*
thread
,
CONTEXT
*
context
,
unsigned
int
flags
)
{
...
...
server/context_sparc.c
View file @
7dbd1f01
...
...
@@ -172,14 +172,6 @@ void *get_thread_ip( struct thread *thread )
return
(
void
*
)
context
.
pc
;
}
/* send a signal to a specific thread */
int
tkill
(
int
tgid
,
int
pid
,
int
sig
)
{
/* FIXME: should do something here */
errno
=
ENOSYS
;
return
-
1
;
}
/* retrieve the thread context */
void
get_thread_context
(
struct
thread
*
thread
,
CONTEXT
*
context
,
unsigned
int
flags
)
{
...
...
server/context_x86_64.c
View file @
7dbd1f01
...
...
@@ -261,22 +261,6 @@ void *get_thread_ip( struct thread *thread )
return
(
void
*
)
context
.
Rip
;
}
/* send a signal to a specific thread */
int
tkill
(
int
tgid
,
int
pid
,
int
sig
)
{
#ifdef __linux__
int
ret
;
__asm__
(
"syscall"
:
"=a"
(
ret
)
:
"0"
(
200
)
/*SYS_tkill*/
,
"D"
(
pid
),
"S"
(
sig
)
);
if
(
ret
>=
0
)
return
ret
;
errno
=
-
ret
;
return
-
1
;
#else
errno
=
ENOSYS
;
return
-
1
;
#endif
}
/* retrieve the thread context */
void
get_thread_context
(
struct
thread
*
thread
,
CONTEXT
*
context
,
unsigned
int
flags
)
{
...
...
server/ptrace.c
View file @
7dbd1f01
...
...
@@ -173,6 +173,37 @@ int get_ptrace_pid( struct thread *thread )
return
thread
->
unix_pid
;
}
/* send a signal to a specific thread */
static
inline
int
tkill
(
int
tgid
,
int
pid
,
int
sig
)
{
int
ret
=
-
ENOSYS
;
#ifdef __linux__
# ifdef __i386__
__asm__
(
"pushl %%ebx
\n\t
"
"movl %2,%%ebx
\n\t
"
"int $0x80
\n\t
"
"popl %%ebx
\n\t
"
:
"=a"
(
ret
)
:
"0"
(
270
)
/*SYS_tgkill*/
,
"r"
(
tgid
),
"c"
(
pid
),
"d"
(
sig
)
);
if
(
ret
==
-
ENOSYS
)
__asm__
(
"pushl %%ebx
\n\t
"
"movl %2,%%ebx
\n\t
"
"int $0x80
\n\t
"
"popl %%ebx
\n\t
"
:
"=a"
(
ret
)
:
"0"
(
238
)
/*SYS_tkill*/
,
"r"
(
pid
),
"c"
(
sig
)
);
# elif defined(__x86_64__)
__asm__
(
"syscall"
:
"=a"
(
ret
)
:
"0"
(
200
)
/*SYS_tkill*/
,
"D"
(
pid
),
"S"
(
sig
)
);
# endif
#endif
/* __linux__ */
if
(
ret
>=
0
)
return
ret
;
errno
=
-
ret
;
return
-
1
;
}
/* send a Unix signal to a specific thread */
int
send_thread_signal
(
struct
thread
*
thread
,
int
sig
)
{
...
...
server/thread.h
View file @
7dbd1f01
...
...
@@ -126,7 +126,6 @@ extern void resume_after_ptrace( struct thread *thread );
extern
void
*
get_thread_ip
(
struct
thread
*
thread
);
extern
void
get_thread_context
(
struct
thread
*
thread
,
CONTEXT
*
context
,
unsigned
int
flags
);
extern
void
set_thread_context
(
struct
thread
*
thread
,
const
CONTEXT
*
context
,
unsigned
int
flags
);
extern
int
tkill
(
int
tgid
,
int
pid
,
int
sig
);
extern
int
send_thread_signal
(
struct
thread
*
thread
,
int
sig
);
extern
void
get_selector_entry
(
struct
thread
*
thread
,
int
entry
,
unsigned
int
*
base
,
unsigned
int
*
limit
,
unsigned
char
*
flags
);
...
...
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