Mail Archives: djgpp/1997/08/16/11:57:54
Makulik.Guenther T 27528 R 91-811 WS tx24 wrote:
>
> Paul Derbyshire (ao950 AT FreeNet DOT Carleton DOT CA) wrote:
> : What the heck is a "semaphore"???
>
> A semaphore is a logical construct for synchronizing two processes or threads. Most
> of the time it is realized as a single byte of information a number of processes/threads
> have access to under the following certain conditions:
>
> 1. If the semaphore byte contains the status information 'Free', it can be changed
> to status 'Lock'
>
> 2. If the semaphore byte contains status 'Lock', the accessing process has to wait
> until the status changes to 'Free' before it can be locked again.
>
> That's the basic concept.
>
> There are library functions under UNIX for handling of shared memory and semaphores,
> does any on know wether DJGPP supports these facilities??
>
> cu
> guenther
check: pdmlwp01.zip
it's in one of the \v2* dirs of the DJGPP distro..
it's a multi-threading lib with complete source and ofcourse such a
package has thread syncing so a semaphore is likely to be found in it.
--
-----------------------------------
Peter Zijlstra
aka. The Mage / ZeMBLA - Main Coder
E-Mail: peter at mcs dot nl
-----------------------------------
- Raw text -