diff options
author | julian <julian@FreeBSD.org> | 2002-11-22 00:23:02 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 2002-11-22 00:23:02 +0000 |
commit | 1f29413454b208e8695bb5791f383247d8906303 (patch) | |
tree | 34f11206334ad12eaddc59ca951622a6f95b5654 /tools | |
parent | f647255a76934d2842173c90225c6a620c0f56a4 (diff) | |
download | FreeBSD-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')
-rw-r--r-- | tools/KSE/ksetest/kse_asm.S | 19 |
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); |