From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <775b8d190603250804l45b2c25ag865617b928ca0ab5@mail.gmail.com> Date: Sun, 26 Mar 2006 03:04:52 +1100 From: "Bruce Ellis" To: "Fans of the OS Plan 9 from Bell Labs" <9fans@cse.psu.edu> Subject: Re: [9fans] new system calls - semacquire, semrelease In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20060325045045.GA13159@mero.morphisms.net> Topicbox-Message-UUID: 206a5884-ead1-11e9-9d60-3106f5b1d025 indeed al this stuff can be one with channels but locks are often easier, paryicularly if nested. =09newlock:=09fn(): ref Lock; =09lock:=09=09fn(l: ref Lock); =09rlock:=09=09fn(l: ref Lock); =09canlock:=09fn(l: ref Lock): int; =09canrlock:=09fn(l: ref Lock): int; =09unlock:=09=09fn(l: ref Lock); brucee On 3/25/06, Charles Forsyth wrote: > there is lock(2) in the public inferno distribution. the implementation = is amusing. > things like counting semaphores have been too, though not distributed, > but these things are not used as much as channels in Limbo programming. > > > > ---------- Forwarded message ---------- > From: William Josephson > To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> > Date: Fri, 24 Mar 2006 23:50:45 -0500 > Subject: Re: [9fans] new system calls - semacquire, semrelease > On Fri, Mar 24, 2006 at 11:52:38AM +1100, Bruce Ellis wrote: > > a bit like ... > > > > semnew: fn(n: int): ref Sem; > > semacquire: fn(s: ref Sem); > > semcanacq: fn(s: ref Sem): int; > > semrelease: fn(s: ref Sem); > > > > in ozinferno > > Interesting... Say, is ozinferno available? > Sounds like it might be interesting to poke at it. > >