5a75deab04 
								
							
								 
							
						 
						
							
							
								
								remove volatile qualifier on ringbuf r/w pointers  
							
							The volatile constraints are excess when compiler barriers are present.
It generates unnecessary `mov` instructions when pointers aren't going
to be updated. 
							
						 
						3 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								f4f567348b 
								
							
								 
							
						 
						
							
							
								
								fix ringbuffer thread safety on ARM.  fix   #715   #388  
							
							This patch addresses the thread safety problem of `jack_ringbuffer_t`
mentioned in #715  and #388 . The overbound read bug caused by this problem
is impossible to reproduce on x86 due to its strong memory ordering, but
it is a problem on ARM and other weakly ordered architectures.
Basically, the main problem is that, on a weakly ordered architecture,
it is possible that the pointer increment after `memcpy` becomes visible
to the other thread before `memcpy` finishes:
	memcpy (&(rb->buf[rb->write_ptr]), src, n1);
	// vvv can be visible to reading thread before memcpy finishes
	rb->write_ptr = (rb->write_ptr + n1) & rb->size_mask;
If this happens, the other thread can read the remaining garbage values
in `rb->buf` due to be overwritten by the unfinished `memcpy`.
To fix this, an explicit pair of release/acquire memory fences [1] is
used to ensure the copy on the other thread *happens after* the `memcpy`
finishes so no garbage values can be read.
[1]: https://preshing.com/20130922/acquire-and-release-fences/  
							
						 
						3 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								c83577f82c 
								
							
								 
							
						 
						
							
							
								
								EXPORT macro renamed to LIB_EXPORT.  
							
							git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4492  0c269be4-1314-0410-8aa9-9f06e86f4224 
							
						 
						14 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								52993cd859 
								
							
								 
							
						 
						
							
							
								
								Add jack_flush_adapter API.  
							
							git-svn-id: http://subversion.jackaudio.org/jack/jack2/branches/libjacknet@3953  0c269be4-1314-0410-8aa9-9f06e86f4224 
							
						 
						15 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								5f68a6557a 
								
							
								 
							
						 
						
							
							
								
								rebase from trunk 3813:3899  
							
							git-svn-id: http://subversion.jackaudio.org/jack/jack2/branches/libjacknet@3900  0c269be4-1314-0410-8aa9-9f06e86f4224 
							
						 
						15 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								f7cb14ec45 
								
							
								 
							
						 
						
							
							
								
								Fix for ticket  #154 .  
							
							git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@3869  0c269be4-1314-0410-8aa9-9f06e86f4224 
							
						 
						16 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								c303556637 
								
							
								 
							
						 
						
							
							
								
								Client debugging code improved.  
							
							git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@3823  0c269be4-1314-0410-8aa9-9f06e86f4224 
							
						 
						16 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								6b765f0168 
								
							
								 
							
						 
						
							
							
								
								rebase from trunk 3684:3813  
							
							git-svn-id: http://subversion.jackaudio.org/jack/jack2/branches/libjacknet@3814  0c269be4-1314-0410-8aa9-9f06e86f4224 
							
						 
						16 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								eb85ac5668 
								
							
								 
							
						 
						
							
							
								
								Fix ringbuffer.c again.  
							
							git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@3778  0c269be4-1314-0410-8aa9-9f06e86f4224 
							
						 
						16 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								5914cf5115 
								
							
								 
							
						 
						
							
							
								
								Better memory allocation error checking in ringbuffer.c, weak import improvements.  
							
							git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@3777  0c269be4-1314-0410-8aa9-9f06e86f4224 
							
						 
						16 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								51fbf0cf71 
								
							
								 
							
						 
						
							
							
								
								rebase from trunk 3420:3447  
							
							git-svn-id: http://subversion.jackaudio.org/jack/jack2/branches/libjacknet@3448  0c269be4-1314-0410-8aa9-9f06e86f4224 
							
						 
						16 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								0ce4b47215 
								
							
								 
							
						 
						
							
							
								
								Automatic adaptative ringbuffer size mode when -g = 0.  
							
							git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@3423  0c269be4-1314-0410-8aa9-9f06e86f4224 
							
						 
						16 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								171a3c4a0d 
								
							
								 
							
						 
						
							
							
								
								Client and library global context cleanup in case of incorrect shutdown handling (that is applications not correctly closing client after server has shutdown).  
							
							git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@3207  0c269be4-1314-0410-8aa9-9f06e86f4224 
							
						 
						17 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								7f5f7dec44 
								
							
								 
							
						 
						
							
							
								
								Report ringbuffer.c fixes from jack1. Fix for ticket  #102 .  
							
							git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@3126  0c269be4-1314-0410-8aa9-9f06e86f4224 
							
						 
						17 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								82fb19ae07 
								
							
								 
							
						 
						
							
							
								
								Fix symbols export in ringbuffer.c.  
							
							git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@3083  0c269be4-1314-0410-8aa9-9f06e86f4224 
							
						 
						17 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								f19b74f904 
								
							
								 
							
						 
						
							
							
								
								Header cleanup, add --clients and --ports options in configure.  
							
							git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@2957  0c269be4-1314-0410-8aa9-9f06e86f4224 
							
						 
						17 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								3e01068967 
								
							
								 
							
						 
						
							
							
								
								Merge Michael Voigt drops branch after reorganization step.  
							
							git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@2880  0c269be4-1314-0410-8aa9-9f06e86f4224 
							
						 
						17 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								2d323a8488 
								
							
								 
							
						 
						
							
							
								
								Remove JackCallbackAudioAdapter class - Add portaudio debug dll - Add dummy driver on windows  
							
							git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@2691  0c269be4-1314-0410-8aa9-9f06e86f4224 
							
						 
						17 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								4ad5bd7b0c 
								
							
								 
							
						 
						
							
							
								
								Remove incusion of internal header from external header and thus fix building of non sequencer  
							
							git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@2485  0c269be4-1314-0410-8aa9-9f06e86f4224 
							
						 
						17 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								a20801bf58 
								
							
								 
							
						 
						
							
							
								
								Better control of exported symbols.  
							
							git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@2456  0c269be4-1314-0410-8aa9-9f06e86f4224 
							
						 
						17 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								b5bd3afb28 
								
							
								 
							
						 
						
							
							
								
								Add conditional includes for config.h, for use with waf  
							
							git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@2423  0c269be4-1314-0410-8aa9-9f06e86f4224 
							
						 
						17 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								0026513c0a 
								
							
								 
							
						 
						
							
							
								
								Cleanup  
							
							git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@1835  0c269be4-1314-0410-8aa9-9f06e86f4224 
							
						 
						17 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								2fd68fdfbf 
								
							
								 
							
						 
						
							
							
								
								Reorganize jack headers.  
							
							git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@1614  0c269be4-1314-0410-8aa9-9f06e86f4224 
							
						 
						18 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								8057bf5451 
								
							
								 
							
						 
						
							
							
								
								Cleanup  
							
							git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@1578  0c269be4-1314-0410-8aa9-9f06e86f4224 
							
						 
						18 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								74fcf9020d 
								
							
								 
							
						 
						
							
							
								
								Fix memory leak in ringbuffer.c  
							
							git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@1316  0c269be4-1314-0410-8aa9-9f06e86f4224 
							
						 
						19 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								73e2d7a6d3 
								
							
								 
							
						 
						
							
							
								
								First import  
							
							git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@1195  0c269be4-1314-0410-8aa9-9f06e86f4224 
							
						 
						19 years ago