eefc7c73e2
I'm not sure all the situations it affects, to be honest. The fix aimed to address the strange symptom here: http://forums.rockbox.org/index.php/topic,50793.0.html It turns out that ringbuf_add_cross was used when handles were butted up against one another with the first parameter equal to the last, which it interprets as being an empty case when it should be interpreted as full in the context it was used. To fix this, introduce full/empty variants of ringbuf_add_cross and ringbuf_sub and use them at the appropriate time. The other way to address the problem is ensure there's always at least a space byte between the end of one handle and the start of another but this make the code a bit trickier to reason about than using additional function variants. bufopen() may yield after creating a handle and so do some more locking so that the buffering thread doesn't mess things up by moving anything or not seeing the yet-to-be linked-in allocation. Add alignof() macro to use proper method to get alignment of struct memory_handle. That should be useful in general anyway. It's merely defined as __alignof__ but looks nicer. Change-Id: If21739eaa33a4f6c084a28ee5b3c8fceecfd87ce |
||
---|---|---|
.. | ||
asm | ||
common | ||
decompressor | ||
drivers | ||
export | ||
include | ||
kernel | ||
libc | ||
target | ||
test | ||
usbstack | ||
arabjoin.c | ||
arabjoin.h | ||
ata_idle_notify.c | ||
backlight-sw-fading.c | ||
backlight.c | ||
bidi.c | ||
buflib.c | ||
COPYING | ||
core_alloc.c | ||
debug.c | ||
eeprom_settings.c | ||
enc_base.c | ||
events.c | ||
firmware.make | ||
font.c | ||
font_cache.c | ||
general.c | ||
hangul.c | ||
ifp_usb_serial.c | ||
load_code.c | ||
logf.c | ||
lru.c | ||
panic.c | ||
pcm.c | ||
pcm_mixer.c | ||
pcm_sampr.c | ||
pcm_sw_volume.c | ||
powermgmt.c | ||
profile.c | ||
README | ||
rolo.c | ||
rom.lds | ||
screendump.c | ||
scroll_engine.c | ||
sdmmc.c | ||
sound.c | ||
SOURCES | ||
storage.c | ||
system.c | ||
timer.c | ||
tuner.c | ||
usb.c |
See docs/README