Skip to contentSkip to conversation

where forked child task first return?

DISCUSSION Bob 2 participants 3 messages Dec 12, 2008 – Dec 13, 2008

lore
Share & tools
lore

Bob

author
#0 lore raw

when task is forked, it will copy his parent's kernel stack.

Then when first time switch_to a new created task, will change to its kernel stack.

But, in switch_to macro will " ldd [%%sp + 0x38], %%i6 ", for child task, stack frame is copyed

from parent, so %%i6 will also the same as the parent's .

so switch to child task will return to parent's kernel stack again ?

---
Best regards

Bo Liu
_________________________________________________________________
Explore the seven wonders of the world
http://search.msn.com/results.aspx?q=7+wonders+world&mkt=en-US&form=QBRE

author
#1 lore raw

Still mess, how the new forked child task is switched...

Quoted 8 lines

From: [email protected]
To: [email protected]
Subject: where forked child task first return?
Date: Fri, 12 Dec 2008 10:16:52 +0800

when task is forked, it will copy his parent's kernel stack.

Quoted 7 lines

Then when first time switch_to a new created task, will change to its kernel stack.

But, in switch_to macro will " ldd [%%sp + 0x38], %%i6 ", for child task, stack frame is copyed

from parent, so %%i6 will also the same as the parent's .

so switch to child task will return to parent's kernel stack again ?

_________________________________________________________________
Connect to the next generation of MSN Messenger
http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline

#2 lore raw
In reply to Bob

From: Bob <[email protected]>
Date: Fri, 12 Dec 2008 17:04:33 +0800

Quoted 2 lines

Still mess, how the new forked child task is switched...

You'll have to figure it out on your own if you're waiting for an explanation from me.