- Remove unused variable from create_thread().
- Move kern_thr_*() prototype to <sys/syscallsubr.h> where all the other kern_*() prototypes live.
This commit is contained in:
parent
50e92415c7
commit
a66fde8d35
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=170404
@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
#include <sys/sched.h>
|
#include <sys/sched.h>
|
||||||
#include <sys/sysctl.h>
|
#include <sys/sysctl.h>
|
||||||
#include <sys/smp.h>
|
#include <sys/smp.h>
|
||||||
|
#include <sys/syscallsubr.h>
|
||||||
#include <sys/sysent.h>
|
#include <sys/sysent.h>
|
||||||
#include <sys/systm.h>
|
#include <sys/systm.h>
|
||||||
#include <sys/sysproto.h>
|
#include <sys/sysproto.h>
|
||||||
@ -143,7 +144,6 @@ create_thread(struct thread *td, mcontext_t *ctx,
|
|||||||
stack_t stack;
|
stack_t stack;
|
||||||
struct thread *newtd;
|
struct thread *newtd;
|
||||||
struct proc *p;
|
struct proc *p;
|
||||||
long id;
|
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
error = 0;
|
error = 0;
|
||||||
@ -183,7 +183,6 @@ create_thread(struct thread *td, mcontext_t *ctx,
|
|||||||
* its storage, because child thread may exit quickly and
|
* its storage, because child thread may exit quickly and
|
||||||
* memory is freed before parent thread can access it.
|
* memory is freed before parent thread can access it.
|
||||||
*/
|
*/
|
||||||
id = newtd->td_tid;
|
|
||||||
if ((child_tid != NULL &&
|
if ((child_tid != NULL &&
|
||||||
suword_lwpid(child_tid, newtd->td_tid)) ||
|
suword_lwpid(child_tid, newtd->td_tid)) ||
|
||||||
(parent_tid != NULL &&
|
(parent_tid != NULL &&
|
||||||
|
@ -48,6 +48,7 @@ struct stat;
|
|||||||
struct kevent;
|
struct kevent;
|
||||||
struct kevent_copyops;
|
struct kevent_copyops;
|
||||||
struct sendfile_args;
|
struct sendfile_args;
|
||||||
|
struct thr_param;
|
||||||
|
|
||||||
int kern___getcwd(struct thread *td, u_char *buf, enum uio_seg bufseg,
|
int kern___getcwd(struct thread *td, u_char *buf, enum uio_seg bufseg,
|
||||||
u_int buflen);
|
u_int buflen);
|
||||||
@ -168,6 +169,8 @@ int kern_statfs(struct thread *td, char *path, enum uio_seg pathseg,
|
|||||||
struct statfs *buf);
|
struct statfs *buf);
|
||||||
int kern_symlink(struct thread *td, char *path, char *link,
|
int kern_symlink(struct thread *td, char *path, char *link,
|
||||||
enum uio_seg segflg);
|
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,
|
int kern_truncate(struct thread *td, char *path, enum uio_seg pathseg,
|
||||||
off_t length);
|
off_t length);
|
||||||
int kern_unlink(struct thread *td, char *path, enum uio_seg pathseg);
|
int kern_unlink(struct thread *td, char *path, enum uio_seg pathseg);
|
||||||
|
@ -64,10 +64,7 @@ int thr_kill(long id, int sig);
|
|||||||
int thr_suspend(const struct timespec *timeout);
|
int thr_suspend(const struct timespec *timeout);
|
||||||
int thr_wake(long id);
|
int thr_wake(long id);
|
||||||
int thr_set_name(long id, const char *name);
|
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 /* !_KERNEL */
|
||||||
|
|
||||||
#endif /* ! _SYS_THR_H_ */
|
#endif /* ! _SYS_THR_H_ */
|
||||||
|
Loading…
Reference in New Issue
Block a user