This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Sparc context switching enhancement possibility?


Hi:
    I have looked into the source code for switching the context between for
sparc target. There are something I can't really understand:

When saving the old thread's register window set ( 8 or less), it seems it
makes sequence of " save %sp, -16 * 4, %sp" instructions in order to cause
the register window overflow happens then the trap handler will store all
the register window set onto the stack of the old thread(is this correct??).
But why can't we just save the the register windows which have already been
used in the old thread rather than open all the register window to get a reg
win overflow trap for saving onto the old thread's stack? Will that save
time?


BTW I tried to follow the flow of the context switching in sparc but just
can't get through the stack. attached is a pic of how I think the stack is
changing during the context switching, hope anybody can piont out any
mistake.

Thanks a lot.

Attachment: question.jpg
Description: JPEG image

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]