[PD-dev] Using PD funcs from inside a threaded external

Mathieu Bouchard matju at artengine.ca
Wed Mar 18 22:09:54 CET 2009


On Wed, 18 Mar 2009, Tim Blechmann wrote:

>> The problem is that I've approached all the gphoto calling functions the
>> same, but one particular function (listconfig) segfaults when I use PD
>> functions, in particular outlet_symbol().
>
> when calling pd's api functions from a separate thread, make sure to
> hold the global pd lock ...

Yes, sorry, I should have known.

This is sys_lock() and sys_unlock() if pd is compiled with THREAD_LOCKING 
enabled.

Afaik, this will do the rough equivalent of a [delay 0] across threads, so 
that your (Ben's) thread's execution is inserted between two t_clock 
events ([delay], [metro], etc.)

  _ _ __ ___ _____ ________ _____________ _____________________ ...
| Mathieu Bouchard - tél:+1.514.383.3801, Montréal, Québec


More information about the Pd-dev mailing list