lkml.org 
[lkml]   [2000]   [Nov]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: 2.2.18Pre Lan Performance Rocks!
Date
"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 majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:45    [W:0.168 / U:0.748 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site