First attempt at Max5 withlocks/master branch port to Max6. Can't figure out how to pass inlet/outlet connection info to perform64 routine. Commented out some memset stuff in free method to prevent crashing. Doesn't perform correctly in Max5.
Updated README.
Corrected mutex id incrementing in zns.send~ constructor. Close to fully working, but destructor still has memset problems... when all zns.send~s are deleted shared buffers don't zero out.
in zns.send~ free method, using sysmem_resizeptrclear instead of memset, to avoid crashes (seems to be necessary in Max6...).
Reverted back to using memset rather than sysmem_resizeptrclear in zns.send~ free method. I was using the samplerate rather than the sig vector size to size the internal buffers in the zns.send~ dsp method, causing the crashes. Added internal buffer clearing in zns.receive~ dsp method.
Replaced sysmem_copyptr() with loop through by sample when saving input samples to internal array. This fixed the issues with Max5, so it now works with both Max5 and Max6. Recompiled externals.
Minor changes: casting long to int in perform routines, etc.
Rebuilt externals.
Now NUM_MUTEX define references SYS_PARALLEL_WORKERS rather than hardcoded value. maxmspsdk.xcconfig updated for Xcode 4.5.x.
Using pthread.h, now able to assign all instances that are on the same thread to the same write buffer. This allows me to remove all the mute_exes previously locking the write buffers, resulting in a significant performance increase! Now only locking using global mute_ex, and only using this in perform routine around read/write from/to read buffers.
zns.connect_impl files weren't updated correctly for last commit. Additionally added get_processorcount(), and using that to size l_vec_write, etc.
Removed double-buffer read-from array and imposing throw~/catch~-like constraints on object, only allowing one receiver object of a given name to be instantiated. Also, add missing x->_thread_id reset in send_dsp methods (resets thread_ids). Two big things I'm noticing now. 1) It seems that often more than one sender is writing to read_from buffer. This means that the out: section in perform routine is not as foolproof as I thought. 2) At low voice counts in poly~, the DSP chain seems to be randomly reordering itself so that there's a chance for receiver to occur at end of one pass, and at beginning of next. This is bad, and results in glitch. This doesn't seem to happen in Max5, interestingly.
Updated dsp_state method to update x->l_data->_update on any dac state change (seemingly required for Max5).
Moved summing of l_vec_write buffers to l_vec_read into zns.receive~ perform routine. This gets rid of the strange apparent dsp chain issues I was seeing in Max6 with previous commit.
Removed mute_ex calls from zns.receive~ perform routine, so now almost completely lockless! Still using one global mute_ex for shared object array resizing, clearing, etc. Also some small cleanup throughout. This is ready for implementation in panners.
Now zeroing out ALL buffers (including shared l_vec_write arrays) within receiver perform routine. This removes the need for counting in the sender perform routine, and fixes the issue with muting a voice within poly~.
Compiled for deployment, now twice and fast.
More small optimizations in perform routines.
Minor perform routine optimizations.
Merge branch 'max6_nolocks'

Conflicts:
	README
	externals/zns.receive~.mxo/Contents/Info.plist
	externals/zns.receive~.mxo/Contents/MacOS/zns.receive~
	externals/zns.send~.mxo/Contents/Info.plist
	externals/zns.send~.mxo/Contents/MacOS/zns.send~
	include/zns.connect_impl.c
	include/zns.connect_impl.h
	maxmspsdk.xcconfig
	zns.receive~/zns.receive~.c
	zns.send~/zns.send~.c