Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ulowell!hawk.ulowell.edu!arosen From: arosen@hawk.ulowell.edu (MFHorn) Newsgroups: comp.sys.sequent Subject: Re: Semaphores Keywords: mutex.h Message-ID: <11964@swan.ulowell.edu> Date: 4 Mar 89 00:20:08 GMT References: <778@htsa.uucp> Sender: news@swan.ulowell.edu Reply-To: arosen@hawk.ulowell.edu Organization: University of Lowell, CS Dept Lines: 26 > Roaming around in the directories I've found the file > /usr/include/sys/mutex.h . > Some _very_ interesting routines are mentioned there. Are these routine > for > public use, and if so, how are they called by. I don't think you can call those routines from a user-level program. I've seen most of the routines declared there in the kernel (being a parallel architecture, you have to be very careful about resource allocation; you're NOT the only process running). Dynix does support user-level semaphores. See /usr/include/sys/{sem,ipc}.h and the man pages for semop, semget and semctl. I also have a program written by Jim Pickering that was posted some time ago which graphically (curses) illustrates the dining philosophers problem using semaphores. -- "The most valuable commodity that I can think of, is information." -Gordon Gecko, Wall Street -- Andy Rosen | arosen@hawk.ulowell.edu | "I got this guitar and I ULowell, Box #3031 | ulowell!arosen | learned how to make it Lowell, Ma 01854 | | talk" -Thunder Road RD in '88 - The way it should've been