Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F143705733
D1028.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D1028.diff
View Options
Index: head/sys/kern/kern_thr.c
===================================================================
--- head/sys/kern/kern_thr.c
+++ head/sys/kern/kern_thr.c
@@ -307,9 +307,6 @@
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) {
@@ -317,8 +314,17 @@
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) {
Index: head/sys/sys/syscallsubr.h
===================================================================
--- head/sys/sys/syscallsubr.h
+++ head/sys/sys/syscallsubr.h
@@ -214,6 +214,7 @@
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,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Feb 1, 8:01 AM (18 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28314235
Default Alt Text
D1028.diff (1 KB)
Attached To
Mode
D1028: 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(). Where the second will be used in linux_exit() system call later.
Attached
Detach File
Event Timeline
Log In to Comment