diff options
-rw-r--r-- | sys/kern/kern_thr.c | 3 | ||||
-rw-r--r-- | sys/sys/syscallsubr.h | 3 | ||||
-rw-r--r-- | sys/sys/thr.h | 5 |
3 files changed, 5 insertions, 6 deletions
diff --git a/sys/kern/kern_thr.c b/sys/kern/kern_thr.c index 33ec6c4..bcbe168 100644 --- a/sys/kern/kern_thr.c +++ b/sys/kern/kern_thr.c @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include <sys/sched.h> #include <sys/sysctl.h> #include <sys/smp.h> +#include <sys/syscallsubr.h> #include <sys/sysent.h> #include <sys/systm.h> #include <sys/sysproto.h> @@ -143,7 +144,6 @@ create_thread(struct thread *td, mcontext_t *ctx, stack_t stack; struct thread *newtd; struct proc *p; - long id; int error; error = 0; @@ -183,7 +183,6 @@ create_thread(struct thread *td, mcontext_t *ctx, * its storage, because child thread may exit quickly and * memory is freed before parent thread can access it. */ - id = newtd->td_tid; if ((child_tid != NULL && suword_lwpid(child_tid, newtd->td_tid)) || (parent_tid != NULL && diff --git a/sys/sys/syscallsubr.h b/sys/sys/syscallsubr.h index a426b29..1cba85d 100644 --- a/sys/sys/syscallsubr.h +++ b/sys/sys/syscallsubr.h @@ -48,6 +48,7 @@ struct stat; struct kevent; struct kevent_copyops; struct sendfile_args; +struct thr_param; int kern___getcwd(struct thread *td, u_char *buf, enum uio_seg bufseg, u_int buflen); @@ -168,6 +169,8 @@ int kern_statfs(struct thread *td, char *path, enum uio_seg pathseg, struct statfs *buf); int kern_symlink(struct thread *td, char *path, char *link, enum uio_seg segflg); +int kern_thr_new(struct thread *td, struct thr_param *param); +int kern_thr_suspend(struct thread *td, struct timespec *tsp); int kern_truncate(struct thread *td, char *path, enum uio_seg pathseg, off_t length); int kern_unlink(struct thread *td, char *path, enum uio_seg pathseg); diff --git a/sys/sys/thr.h b/sys/sys/thr.h index bcf1ef9..6331a7a 100644 --- a/sys/sys/thr.h +++ b/sys/sys/thr.h @@ -64,10 +64,7 @@ int thr_kill(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); -#else -struct thread; -int kern_thr_new(struct thread *td, struct thr_param *param); -int kern_thr_suspend(struct thread *, struct timespec *); + #endif /* !_KERNEL */ #endif /* ! _SYS_THR_H_ */ |