"Jeff V. Merkey" wrote:
> A "context" is usually assued to be a "stack".  The simplest of all
> context switches is:
> 
>    mov    x, esp
>    mov    esp, y

Presumeably you'd immediately do a ret to some address, and there pop a
base address off the stack to get some global memory.  Is that right? 
Your context switches would be inline, and you'd have hardcoded which
process to execute next in most cases.

I'll buy the concept that changing stacks amounts to changing contexts,
so long as you follow certain rules.  Obviously, rules are what define a
context.  What are the two instructions that precede and the two
instructions that follow?  I'd guess, something like this:

   push bp
   push $1
   mov x, esp
   mov esp, y
   ret
$1 pop bp

--
Daniel
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

Reply via email to