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)
This commit is contained in:
Julian Elischer 2002-11-22 00:23:02 +00:00
parent 16d7acae14
commit c2f7aa6939

View File

@ -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);