svn commit: r293480 - in stable/10/sys: kern sys
Dmitry Chagin
dchagin at FreeBSD.org
Sat Jan 9 14:36:46 UTC 2016
Author: dchagin
Date: Sat Jan 9 14:36:44 2016
New Revision: 293480
URL: https://svnweb.freebsd.org/changeset/base/293480
Log:
MFC r283372:
In preparation for switching linuxulator to the use the native 1:1
threads split sys_thr_exit() up into sys_thr_exit() and kern_thr_exit().
Move
Where the second will be used in linux_exit() system call later.
Modified:
stable/10/sys/kern/kern_thr.c
stable/10/sys/sys/syscallsubr.h
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/kern/kern_thr.c
==============================================================================
--- stable/10/sys/kern/kern_thr.c Sat Jan 9 14:34:29 2016 (r293479)
+++ stable/10/sys/kern/kern_thr.c Sat Jan 9 14:36:44 2016 (r293480)
@@ -305,9 +305,6 @@ int
sys_thr_exit(struct thread *td, struct thr_exit_args *uap)
/* long *state */
{
- struct proc *p;
-
- p = td->td_proc;
/* Signal userland that it can free the stack. */
if ((void *)uap->state != NULL) {
@@ -315,8 +312,17 @@ sys_thr_exit(struct thread *td, struct t
kern_umtx_wake(td, uap->state, INT_MAX, 0);
}
- rw_wlock(&tidhash_lock);
+ return (kern_thr_exit(td));
+}
+
+int
+kern_thr_exit(struct thread *td)
+{
+ struct proc *p;
+ p = td->td_proc;
+
+ rw_wlock(&tidhash_lock);
PROC_LOCK(p);
if (p->p_numthreads != 1) {
Modified: stable/10/sys/sys/syscallsubr.h
==============================================================================
--- stable/10/sys/sys/syscallsubr.h Sat Jan 9 14:34:29 2016 (r293479)
+++ stable/10/sys/sys/syscallsubr.h Sat Jan 9 14:36:44 2016 (r293480)
@@ -246,6 +246,7 @@ int kern_ktimer_settime(struct thread *t
int kern_ktimer_gettime(struct thread *td, int timer_id,
struct itimerspec *val);
int kern_ktimer_getoverrun(struct thread *td, int timer_id);
+int kern_thr_exit(struct thread *td);
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,
More information about the svn-src-stable
mailing list