On Thu, 6 Dec 2001, Steve Harris wrote: > On Thu, Dec 06, 2001 at 09:13:45AM -0500, Paul Davis wrote: > > imagine, but its not clear how you would write the data to the control > > port: it can't be done atomically, and you don't want the plugin > > working with a partially overwritten data set. so, i can easily > > Yes, I see the problem now. The only solution I can see is that the host > will have to hold the new array until the plugin has finished its > run() function and then update.
You can exchange a pointer atomically. To let this work (in fact GLAME does it this way) you need to reference count the actual float array the pointer points to, so the plugin needs to get() the data and release() it after working with it, doing this once for each processing step. Richard. -- Richard Guenther <[EMAIL PROTECTED]> WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/ The GLAME Project: http://www.glame.de/
