Subject: Re: more funky stuff with kthreads and interrupts
To: None <port-mips@mail.netbsd.org>
From: Toru Nishimura <nisimura@itc.aist-nara.ac.jp>
List: port-mips
Date: 05/07/2001 15:55:11
mhitch@lightning.msu.montana.edu wrote;

> the very first thing
> proc_trampoline() does is call the "service function".  For a kthread
> process, the "service function" is the kthread process start, and will
> never return from the jsr.  The kthread process runs at the SPL level that
> was in the pcb context when the process starts.  The SPL level is set from
> the SR value set by cpu_fork().

I was thinking of the significance of if (p1 == curproc) clause found
in i386.  If the clause makes a false condition, the issue we
experience in NetBSD/mips can not be helped.  So, cpu_fork() is not
"forking" in essense anymore, and rather close to "contination" in a
limited fashion.  Given such the circumstances, it'd be acceptable to
have a new SR value, explicitly, for a new thread of control, I think.

Tohru Nishimura