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:
parent
f647255a76
commit
1f29413454
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user