Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!decwrl!mcnc!taco!osl.csc.ncsu.edu!miler From: miler@osl.csc.ncsu.edu (George Miler) Newsgroups: comp.unix.wizards Subject: UNIX v7 calling sched() Message-ID: <1991Apr12.172939.6348@ncsu.edu> Date: 12 Apr 91 17:29:39 GMT Sender: news@ncsu.edu (USENET News System) Organization: Operating Systems Laboratory (OSL), NCSU, Raleigh NC Lines: 35 Originator: miler@osl.csc.ncsu.edu I am working on a project at NC State University involving porting UNIX Version 7 to a 68000 based machine. I have reached a point where a few things are a bit unclear to me. In function main(), the internal inits are done and newproc is called to set up "/etc/init". Once this is done, main() returns and the code in start.s does a return from interrupt to get things going. What I don't understand is how sched() gets going. The sched() function is called if newproc() does not create the init process, followed by main() returning. But, of course, we need /etc/init so that is done. main () { ...... if (newproc()) <==== true, create /etc/init process { copy (/etc/init) return; <==== exit main, starts copied process } sched (); <==== never reached if did /etc/init } Any help or explanation you are able to send me will be greatly appericated. George Miler miler@adm.csc.ncsu.edu -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= George B. Miler North Carolina State University miler@adm.csc.ncsu.edu {decvax, gatech}!mcnc!ncsuvx!cscadm!miler =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=