Subject: Re: proposal for PR 27023
To: None <tech-kern@netbsd.org, port-sparc@netbsd.org,>
From: Chuck Silvers <chuq@chuq.com>
List: port-sparc64
Date: 01/25/2005 10:08:59
... of course, while in the shower just after sending the previous message,
I realized that I was confusing things.  there are actually two cases
for SA context switching:

 (1) handled by libpthread.  in this case, the register window contents
     must be flushed to the user stack, since as I talked about before,
     the thread may be run on a different LWP next.

 (2) handled by the kernel.  in this case, the user thread is obviously
     tied to the current LWP (since the thread/LWP is going to sleep in
     the kernel), so in this case saving the register windows to the PCB
     is good enough.


so it's much simpler than I thought, cpu_getmcontext() just has to
distinguish these cases and skip the rwindow_save() in the latter case.

-Chuck