summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_kse.c
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2005-04-23 02:32:32 +0000
committerdavidxu <davidxu@FreeBSD.org>2005-04-23 02:32:32 +0000
commit2155a04472ed5deabbc69faec29261b585206f8b (patch)
treee8274d07cfba3da625ef093c47b41f515a3a074f /sys/kern/kern_kse.c
parent71a428392919fe740ff01650702e52473e5c3dbc (diff)
downloadFreeBSD-src-2155a04472ed5deabbc69faec29261b585206f8b.zip
FreeBSD-src-2155a04472ed5deabbc69faec29261b585206f8b.tar.gz
Change cpu_set_kse_upcall to more generic style, so we can reuse it
in other codes. Add cpu_set_user_tls, use it to tweak user register and setup user TLS. I ever wanted to merge it into cpu_set_kse_upcall, but since cpu_set_kse_upcall is also used by M:N threads which may not need this feature, so I wrote a separated cpu_set_user_tls.
Diffstat (limited to 'sys/kern/kern_kse.c')
-rw-r--r--sys/kern/kern_kse.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/kern/kern_kse.c b/sys/kern/kern_kse.c
index ed35902..9c492dd 100644
--- a/sys/kern/kern_kse.c
+++ b/sys/kern/kern_kse.c
@@ -780,7 +780,8 @@ kse_create(struct thread *td, struct kse_create_args *uap)
* to the new thread, so we should clear single step
* flag here.
*/
- cpu_set_upcall_kse(newtd, newku);
+ cpu_set_upcall_kse(newtd, newku->ku_func,
+ newku->ku_mailbox, &newku->ku_stack);
if (p->p_flag & P_TRACED)
ptrace_clear_single_step(newtd);
}
@@ -1371,7 +1372,8 @@ thread_userret(struct thread *td, struct trapframe *frame)
* Set user context to the UTS
*/
if (!(ku->ku_mflags & KMF_NOUPCALL)) {
- cpu_set_upcall_kse(td, ku);
+ cpu_set_upcall_kse(td, ku->ku_func, ku->ku_mailbox,
+ &ku->ku_stack);
if (p->p_flag & P_TRACED)
ptrace_clear_single_step(td);
error = suword32(&ku->ku_mailbox->km_lwp,
OpenPOWER on IntegriCloud