Re: Simple, easy multithreaded circular buffer library for Linux?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Paul Davis wrote:> The test that Olivier has written is essentially a no-op on a> uniprocessor x86 system, because there are no cache coherency issues.> The code *is* thread safe on a uniprocessor because of the logic above,> not because we rely on instruction reordering/memory barrier processor> behaviour. 
i haven't thought much about this issue, but the fact that i got afailure on an uniprocessor athlon64 seems to contradict your statement:
(posted to linux-audio-dev earlier:)

nettings@kleineronkel:/build/rbtest> make testgcc -Wall -I. -I./jack -lpthread -o test-int-array-jack \                test-int-array.c jack/ringbuffer.ctest-int-array.c: In function ‘main’:test-int-array.c:101: warning: format ‘%d’ expects type ‘int’, butargument 2 has type ‘long unsigned int’gcc -Wall -I. -I./portaudio -lpthread -o test-int-array-portaudio \                test-int-array.c portaudio/ringbuffer.cportaudio/pa_ringbuffer.ctest-int-array.c: In function ‘main’:test-int-array.c:101: warning: format ‘%d’ expects type ‘int’, butargument 2 has type ‘long unsigned int’gcc -Wall -I. -I./portaudio -lpthread -otest-int-array-portaudio-nobarrier \                -DNO_MEMORY_BARRIER \                test-int-array.c portaudio/ringbuffer.cportaudio/pa_ringbuffer.ctest-int-array.c: In function ‘main’:test-int-array.c:101: warning: format ‘%d’ expects type ‘int’, butargument 2 has type ‘long unsigned int’./alltests.shStarting ringbuffer tests (buffer size: 512)
=== Jack ringbuffer test ===starting ringbuffer stress test (2 minutes max)buffer size (bytes): 512array size (bytes): 256reader started on cpu 0writer started on cpu: 049536 != 49408 at offset 0failure in chunk 330502

-- jörn nettingsmeier
home://germany/45128 essen/lortzingstr. 11/http://spunk.dnsalias.orgphone://+49/201/491621
Kurt is up in Heaven now._______________________________________________Linux-audio-user mailing listLinux-audio-user@xxxxxxxxxxxxxxxxxxxxxxxx://lists.linuxaudio.org/mailman/listinfo/linux-audio-user

[Index of Archives]     [Linux Sound]     [ALSA Users]     [Pulse Audio]     [ALSA Devel]     [Sox Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux