[PD-dev] sys_idlehook

Martin Peach martinrp at vax2.concordia.ca
Thu Nov 10 17:36:09 CET 2005


Tim Blechmann wrote:

>>Surely if there were a procedure in place for using the idlehook,
>>this could be made to work:
>>e.g. any external could check to see if idlehook was taken already.
>>If so, copy the existing idlehook into its local space and replace
>>the idlehook with its own. When the new idlehook is called, it should
>>first call the old one and then its own before returning the 'or' of
>>the two results.
>>On deallocating an idlehook, the external's deconstructor should
>>replace the old idlehook. The last idlehook to be removed would be
>>replaced with NULL.
>>    
>>
>
>right, but there are no guaranties that assure this.
>one badly written external could ruin the whole system. 
>
>imo, this is something, that should be done by the kernel.
>
>t
>
>  
>
Yes, there should be a function in the kernel to register a callback, 
and then it would manage the chaining for the externals. But since one 
can already register a callback with clock_new(), this is probably 
redundant(?).

Martin




More information about the Pd-dev mailing list