Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!mailrus!cs.utexas.edu!usc!ucsd!ucbvax!G.GP.CS.CMU.EDU!David.Black From: David.Black@G.GP.CS.CMU.EDU Newsgroups: comp.sys.encore Subject: Re: Mach threads syscalls (In English) Message-ID: <1451.629761966@G.GP.CS.CMU.EDU> Date: 15 Dec 89 21:52:46 GMT References: <2337@isvax.isl.melco.co.jp> Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 21 Hope this makes it to Japan; that mail path is wild. The only machine-dependent thread syscalls in Mach are thread_get_state and thread_set_state. These calls manipulate the hardware state defined in . The registers in the ns32000_thread_state structure defined there correspond exactly to the hardware registers in the ns32000 architecture. The only restriction imposed by Mach is that it will ignore any attempt to change the supervisor PSR flags (I, P, S, and U). To understand exactly how these registers work, you need to consult the following: 1. A Series 32000 Instruction Set Reference Manual (which will tell you more than you ever wanted to know). 2. The function/procedure calling convention for the language in which you're working (to find out how the compiler and runtime use these registers). If you have source to the cthreads library, you could look at how it sets up a new thread for an example. One note of caution: The MOD register must be set up; failing to get this right can cause strange anomalies (page faults, and sb-relative memory references don't work). --Dave