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

Date: Mon, 11 Aug 1997 12:53:55 -0400 (EDT)
From: "Art S. Kagel" <kagel AT ns1 DOT bloomberg DOT com>
To: Paul Derbyshire <ao950 AT FreeNet DOT Carleton DOT CA>
Cc: djgpp AT delorie DOT com
Subject: Re: Volatile
In-Reply-To: <5sbq8s$jjd@freenet-news.carleton.ca>
Message-Id: <Pine.D-G.3.91.970811124422.3813H-100000@dg1>
Mime-Version: 1.0

On 7 Aug 1997, Paul Derbyshire wrote:

> 
> Andrew Crabtree (andrewc AT typhoon DOT rose DOT hp DOT com) writes:
> >>   I know it sounds crazy, but what does the 'voltaile' with a
> >> variable/function ?
> 
> What the heck is a "semaphore"???

From "UNIX Network Programming" by W. Richard Stevens (p137):

	Semaphores are a synchronization primitive.  As a form of IPC
	they ... are intended to let multiple processes synchronize
	their operations. ...  Consider a semaphore as an integer
	valued variable that is a resource counter.  The value of the
	variable at any point in time is the number of resource units 
	available.

A binary semaphore is a semaphore whose valid values are 0 and 1 which
is normally used to track and protect usage of a single resource.
Mutex semaphores are a newer high speed form of semaphore which is
part of the POSIX light weight thread primitives.  Get an read
Stevens' book, it is the BEST reference on UNIX Interprocess
Communication available.

Art S. Kagel, kagel AT bloomberg DOT com

- Raw text -


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