diff options
author | davidxu <davidxu@FreeBSD.org> | 2007-08-16 05:26:42 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2007-08-16 05:26:42 +0000 |
commit | 0abd045472a2cf18ee61cbff0164e327ffd25c54 (patch) | |
tree | c631700d095836ac5a30fd6eb6fd9a6c4a0467bc /sys/sys/thr.h | |
parent | 1bcb372970356c4bb20cdd532350ea0df88a6f20 (diff) | |
download | FreeBSD-src-0abd045472a2cf18ee61cbff0164e327ffd25c54.zip FreeBSD-src-0abd045472a2cf18ee61cbff0164e327ffd25c54.tar.gz |
Add thr_kill2 syscall which sends a signal to a thread in another process.
Submitted by: Tijl Coosemans tijl at ulyssis dot org
Approved by: re (kensmith)
Diffstat (limited to 'sys/sys/thr.h')
-rw-r--r-- | sys/sys/thr.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sys/sys/thr.h b/sys/sys/thr.h index 6331a7a..ae4a65d 100644 --- a/sys/sys/thr.h +++ b/sys/sys/thr.h @@ -30,8 +30,14 @@ #ifndef _SYS_THR_H_ #define _SYS_THR_H_ +#include <sys/_types.h> #include <sys/sched.h> +#ifndef _SIZE_T_DECLARED +typedef __size_t size_t; +#define _SIZE_T_DECLARED +#endif + /* Create the thread in the suspended state. */ #define THR_SUSPENDED 0x0001 /* Create the system scope thread. */ @@ -55,12 +61,19 @@ struct thr_param { * See pthread_* */ #ifndef _KERNEL +#include <sys/ucontext.h> + +#ifndef _PID_T_DECLARED +typedef __pid_t pid_t; +#define _PID_T_DECLARED +#endif int thr_create(ucontext_t *ctx, long *id, int flags); int thr_new(struct thr_param *param, int param_size); int thr_self(long *id); void thr_exit(long *state); int thr_kill(long id, int sig); +int thr_kill2(pid_t pid, long id, int sig); int thr_suspend(const struct timespec *timeout); int thr_wake(long id); int thr_set_name(long id, const char *name); |