[DGD] Revisited: callout cantrip

Noah Gibbs noah_gibbs at yahoo.com
Mon Jun 1 21:01:18 CEST 2009


  If that happens and then you change the array, at worst you lose a bit of speculative execution.  Even then, only in the cases where you actually read the callout number.  So it will only cost you when/if you use it, and then not much.

--- On Mon, 6/1/09, Dread Quixadhal <quixadhal at chartermi.net> wrote:

> From: Dread Quixadhal <quixadhal at chartermi.net>
> Subject: Re: [DGD] Revisited: callout cantrip
> To: "All about Dworkin's Game Driver" <dgd at dworkin.nl>
> Date: Monday, June 1, 2009, 11:49 AM
> Sounds clever, although I see danger
> with zero-length callouts and DGDMP,
> since without making the section between creating the
> call_out and modifying
> the arguments atomic (or some other semaphore-type
> locking), there's nothing
> to prevent processor #2 from picking it up and running with
> it before you
> actually do the change, no?
> 
> On Mon, Jun 1, 2009 at 7:12 AM, <bart at wotf.org>
> wrote:
> 
> > For those curious about this trick, Gurbalib svn
> revision 271 now uses this
> > call_out 'cantrip' idea in its event daemon. In
> /daemons/event_d.c in the
> > dispatch_event() function, you'll see that the
> counters are passed to a
> > call_out as an array, and then modified after the
> call_out has been
> > started.
> >
> > Bart.
> >
> > On Sat, 14 Mar 2009 02:16:49 -0700, Shentino wrote
> > > Ok, so I was sitting back for a bit,
> experimenting with callouts,
> > >  and I suddenly had the bright idea of
> trying to pass a callout its
> > > callout handle as an argument.
> > >
> > > Naturally, owing to causality, not very
> straightforward.
> > >
> > > Apparently arguments on pending callouts share
> the object's
> > > dataspace, so what I was able to do was pass a
> one element array,
> > >  have the callout scheduled, and then modify
> the array in place ala
> > > TLS/call_trace, thus giving the callout
> information on what its
> > > handle was.
> ___________________________________________
> > https://mail.dworkin.nl/mailman/listinfo/dgd
> >
> >
> > --
> > Created with Open WebMail at http://www.bartsplace.net/
> > Read my weblog at http://soapbox.bartsplace.net/
> >
> > ___________________________________________
> > https://mail.dworkin.nl/mailman/listinfo/dgd
> >
> ___________________________________________
> https://mail.dworkin.nl/mailman/listinfo/dgd
> 


      



More information about the DGD mailing list