From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,LOTS_OF_MONEY autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,6f69b1cf0f02b9ac X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-02-02 14:46:58 PST Path: supernews.google.com!sn-xit-02!sn-xit-01!supernews.com!newsfeed.stanford.edu!news.isc.org!news.gnac.net!uunet!sac.uu.net!usenet.rational.com!not-for-mail From: "Mark Lundquist" Newsgroups: comp.lang.ada Subject: Re: How can I avoid Using a Semaphore? (long) Date: Fri, 2 Feb 2001 14:18:13 -0800 Organization: Rational Software Message-ID: <95fbn7$njb$1@usenet.rational.com> References: <94hoeu$puk$1@nnrp1.deja.com> NNTP-Posting-Host: ext-3074.rational.com X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Xref: supernews.google.com comp.lang.ada:4893 Date: 2001-02-02T14:18:13-08:00 List-Id: Steve, sorry to take so long getting back to you. You probably have it all figured out by now... DuckE wrote in message news:b89b6.298508$U46.9559869@news1.sttls1.wa.home.com... > >[mark wrote] > > I don't get it! Can you explain that? Are you talking about > > the "potentially blocking" rule? I don't see how the scenario you > > described would run afoul of that rule, and I couldn't find anything in > > your example code to help me understand what you meant... > > This is exactly the rule I'm talking about. Entries are potentially blocking, but protected subprograms are not. You don't need entries in your protected reference count, right? So you should be OK? > > > > 3) You have an array of free block lists, and a "parallel" array of > > mutexes associated with the free block lists. Doesn't that mean that > > you really want a mutex to be part of a free block list? > > > > Perhaps, but as you'll notice I initialize my free block lists using: > > availablePacketTable : anAvailablePacketTable := > ( 1 => ( NULL, 2**5, 0, 64 ), -- 32 > 2 => ( NULL, 2**6, 0, 32 ), -- 64 > 3 => ( NULL, 2**7, 0, 32 ), -- 128 > > If I made the "mutex" a part of the record, how would it appear in this > initializer? Well, it would look like something like: availablePacketTable : anAvailablePacketTable := ( 1 => Create_Packet_Table_Entry (Size => 2**5, Count => 64), 2 => Create_Packet_Table_Entry (Size => 2**6, Count => 32), . . . ); Best, Mark