Article View: comp.os.os2.programmer
Article #1613Re: Counting semaphores?
From: Dan SPALDING
Date: Sat, 03 Nov 1990 20:05
Date: Sat, 03 Nov 1990 20:05
12 lines
1103 bytes
1103 bytes
In article <1610001@hpcc01.HP.COM> tomj@hpcc01.HP.COM (Tom Johnson) writes: >>>> 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? > What you want to use is the Fast Safe Ram semaphores or named (system) semaphores. Both of them will implement counting and won't release some thread waiting on the semaphore until the count reaches zero. However, the same process can request the semaphore if it already owns it (in the same thread) and it just bumps the count.
Technical Details
Message-ID:
<58751@microsoft.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!watmath!att!att!rutgers!cs.utexas.edu!uunet!microsoft!dansReferences:
<90Oct26.163804edt.8236@orasis.vis.toronto.edu> <1610001@hpcc01.HP.COM>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!watmath!att!att!rutgers!cs.utexas.edu!uunet!microsoft!dans From: dans@microsoft.UUCP (Dan SPALDING) Newsgroups: comp.os.os2.programmer Subject: Re: Counting semaphores? Message-ID: <58751@microsoft.UUCP> Date: 3 Nov 90 20:05:14 GMT References: <90Oct26.163804edt.8236@orasis.vis.toronto.edu> <1610001@hpcc01.HP.COM> Reply-To: dans@microsoft.UUCP (Dan SPALDING) Organization: Microsoft Corp., Redmond WA Lines: 12