From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f678f,562d37d12a49893d X-Google-Attributes: gidf678f,public X-Google-ArrivalTime: 1993-09-17 09:31:05 PST Newsgroups: comp.unix.osf.misc Path: gmd.de!newsserver.jvnc.net!howland.reston.ans.net!usc!elroy.jpl.nasa.gov!swrinde!cs.utexas.edu!uunet!newsgate.watson.ibm.com!hawnews.watson.ibm.com!cyst.watson.ibm.com!dmc From: dmc@kamal.austin.ibm.com (Dave McCracken) Subject: Re: Threads and shared memory Sender: news@hawnews.watson.ibm.com (NNTP News Poster) Message-ID: In-Reply-To: brunor@cnmat5.frec.bull.fr's message of 16 Sep 93 09:36:32 GMT Date: Fri, 17 Sep 1993 14:48:51 GMT Disclaimer: This posting represents the poster's views, not necessarily those of IBM. References: <301@vercors.frec.bull.fr> Nntp-Posting-Host: kamal.austin.ibm.com Organization: IBM T.J. Watson Research In article <301@vercors.frec.bull.fr> brunor@cnmat5.frec.bull.fr (Bruno.Richoux ) writes: > 1) Are the UNIX system calls semop and semctl blocking : if the semaphore is > locked, a call to semop by a thread blocks the thread or blocks the process ? > > 2) Related to 1), are there jacket routines developped for primitives > handling shared memory and / or semaphores and where can I get the > information (I've got the DCE thread sources). If the platform you're running on uses the threads library from OSF, then semop and semctl operations will block the whole process. There is no viable way to provide wrappers for them. The only reason wrappers work for normal IO is because the select() system call can be used to notify the process of IO being available. There is no equivalent mechanism for sem operations. -- ----------------#include ---------------- Dave McCracken IBM DCE Development, Austin, TX IBM email: dmc@austin.ibm.com Real email: dcm@cactus.org