Changeset 2041 for Whitix/trunk

Show
Ignore:
Timestamp:
04/03/09 19:03:10 (3 years ago)
Author:
mwhitworth
Message:

Push flags when swapping stacks, otherwise one tasks' flags carry over to the next (including interrupt bit).

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • Whitix/trunk/arch/i386/kernel/idtstubs.S

    r1839 r2041  
    257257i386ContextSwitch: 
    258258 
     259pushf 
    259260pusha 
    260261 
    261262/* Actually switch the stacks */ 
    262263 
    263 mov 36(%esp),%eax 
     264mov 40(%esp),%eax 
    264265 
    265266/* prevThread's stack may not exist if it has just been freed */ 
     
    269270 
    270271popAll: 
    271 movl 40(%esp),%eax 
     272movl 44(%esp),%eax 
    272273mov (%eax),%esp 
    273274 
    274275popa 
     276popf 
    275277ret 
    276278