delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/08/16/11:57:54

Message-ID: <33F5CB14.4840@no.spam.mcs.nl>
Date: Sat, 16 Aug 1997 17:45:24 +0200
From: Peter Zijlstra <peter AT no DOT spam DOT mcs DOT nl>
Reply-To: peter AT no DOT spam DOT mcs DOT nl
Organization: Zembla
MIME-Version: 1.0
To: DJGPP mailing list <djgpp AT delorie DOT com>
Subject: Re: Volatile
References: <199708061619 DOT AA241634394 AT typhoon DOT rose DOT hp DOT com> <5sbq8s$jjd AT freenet-news DOT carleton DOT ca> <5sesa1$9sl$1 AT horus DOT mch DOT sni DOT de>

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019