summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_thr.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/kern_thr.c')
-rw-r--r--sys/kern/kern_thr.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/kern/kern_thr.c b/sys/kern/kern_thr.c
index 6a5f220..402667a 100644
--- a/sys/kern/kern_thr.c
+++ b/sys/kern/kern_thr.c
@@ -186,12 +186,16 @@ thr_self(struct thread *td, struct thr_self_args *uap)
int
thr_exit(struct thread *td, struct thr_exit_args *uap)
- /* NULL */
+ /* long *state */
{
struct proc *p;
p = td->td_proc;
+ /* Signal userland that it can free the stack. */
+ if ((void *)uap->state != NULL)
+ suword((void *)uap->state, 1);
+
PROC_LOCK(p);
mtx_lock_spin(&sched_lock);
OpenPOWER on IntegriCloud