Path: utzoo!attcan!uunet!maverick.ksu.ksu.edu!umriscc!mcs213f.cs.umr.edu!bobn From: bobn@mcs213f.cs.umr.edu (Bob Niedergerke) Newsgroups: comp.os.os2.programmer Subject: Re: Counting semaphores? Message-ID: <1557@umriscc.isc.umr.edu> Date: 29 Oct 90 22:08:53 GMT References: <90Oct26.163804edt.8236@orasis.vis.toronto.edu> <11219@hubcap.clemson.edu> Sender: news@umriscc.isc.umr.edu Organization: University of Missouri - Rolla Lines: 12 In article <11219@hubcap.clemson.edu> lsalomo@hubcap.clemson.edu (lsalomo) writes: >From article <90Oct26.163804edt.8236@orasis.vis.toronto.edu>, by green@vis.toronto.edu (Anthony Thomas Green): >> Is it possible to set up a system semaphore that must be cleared as many >> times as it has been set in order for a waiting thread to become runnable? > >I always thought that's the way RAM semaphores were implemented? It all depends. If you use DosSemRequest and DosSemClear, the behavior is as described above. Using a DosSemWait/DosSemClear scheme, the semaphore need only be cleared once for a waiting thread to become runnable. bobn