[DGD] Revisited: callout cantrip

Dread Quixadhal quixadhal at chartermi.net
Mon Jun 1 20:49:58 CEST 2009


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
>



More information about the DGD mailing list