summaryrefslogtreecommitdiffstats
path: root/tools/KSE
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>2002-11-22 00:23:02 +0000
committerjulian <julian@FreeBSD.org>2002-11-22 00:23:02 +0000
commit1f29413454b208e8695bb5791f383247d8906303 (patch)
tree34f11206334ad12eaddc59ca951622a6f95b5654 /tools/KSE
parentf647255a76934d2842173c90225c6a620c0f56a4 (diff)
downloadFreeBSD-src-1f29413454b208e8695bb5791f383247d8906303.zip
FreeBSD-src-1f29413454b208e8695bb5791f383247d8906303.tar.gz
Don't flip the "we're it" bit until we are all there..
(don't fill in the mailbox pointer until we have unloaded all the previous contents of the mailbox context block)
Diffstat (limited to 'tools/KSE')
-rw-r--r--tools/KSE/ksetest/kse_asm.S19
1 files changed, 10 insertions, 9 deletions
diff --git a/tools/KSE/ksetest/kse_asm.S b/tools/KSE/ksetest/kse_asm.S
index d568988..79859d8 100644
--- a/tools/KSE/ksetest/kse_asm.S
+++ b/tools/KSE/ksetest/kse_asm.S
@@ -62,7 +62,7 @@ ENTRY(uts_to_thread)
movl $-1, %eax /* bzzzt, invalid context */
jmp 5f
2: movl 8(%esp), %eax /* get address of curthreadp */
- movl %edx, (%eax) /* we're now the current thread */
+ movl %edx, %ebx /* save the pointer for later */
/*
* From here on, we don't touch the old stack.
*/
@@ -85,14 +85,15 @@ ENTRY(uts_to_thread)
jmp 4f
3: fninit
fldcw MC_FP_CW_OFFSET(%edx)
-4: movl 48(%edx), %eax /* restore ax, bx, cx */
- movl 36(%edx), %ebx
- movl 44(%edx), %ecx
- pushl 68(%edx) /* flags on stack */
- pushl 40(%edx) /* %edx on stack */
- popl %edx /* %edx off stack */
- popf /* flags off stack */
-5: ret /* %eip off stack */
+4: pushl 68(%edx) /* flags */
+ pushl 48(%edx) /* eax */
+ pushl 36(%edx) /* ebx */
+ movl 40(%edx), %edx /* edx */
+ movl %ebx, (%eax) /* <---- set new mailbox pointer */
+ popl %ebx
+ popl %eax
+ popf
+5: ret
/*
* int thread_to_uts(struct kse_thr_mailbox *tm, struct kse_mailbox *km);
OpenPOWER on IntegriCloud