View Issue Details

IDProjectCategoryView StatusLast Update
0001420ardourbugspublic2007-01-12 04:35
Reportermtaht Assigned To 
Status newResolutionopen 
Summary0001420: pbd/ringbuffer.h is incorrect for some 64 bit arches: sizeof(gint) != sizeof(size_t)
Descriptionpresently the ringbuffe*.h includes are incorrect for some 64 bit architectures.

secondly write_ptr and read_ptr are actually indexes.

thirdly, few places in this code actually need or can use a size_t size, so you could gain benefits by cutting the sizes down to ints... also....

In looking over the range of the ringbuffers in use, I didn't see any that were greater than 2^16, so the atomic operations could be cut down to a struct of two shorts unioned with int and made completely atomic (with either 16 bit atomic ops or a 32 bit atomic compare and exchange operation)

(or, moved to different cache lines entirely to reduce cache invalidations on smp arches)...

(there are also 64 bit atomic operations available on most arches. See the linux kernel source for complete information in the various atomic header files)
TagsNo tags attached.


There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2007-01-12 04:35 mtaht New Issue