mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
Buffering should align itself and not rely on buffering_reset parameters when storage alignment matters so that wrapped reads maintain alignment.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29258 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
19ea72ff63
commit
0d902c8c54
2 changed files with 8 additions and 0 deletions
|
@ -388,11 +388,14 @@ static inline void cpucache_flush(void)
|
|||
#define STORAGE_PAD(x) ((x) + CACHEALIGN_SIZE - 1)
|
||||
/* Number of bytes in the last cacheline assuming buffer of size x is aligned */
|
||||
#define STORAGE_OVERLAP(x) ((x) & (CACHEALIGN_SIZE - 1))
|
||||
#define STORAGE_ALIGN_BUFFER(start, size) \
|
||||
ALIGN_BUFFER((start), (size), CACHEALIGN_SIZE)
|
||||
#else
|
||||
#define STORAGE_ALIGN_ATTR
|
||||
#define STORAGE_ALIGN_DOWN(x) (x)
|
||||
#define STORAGE_PAD(x) (x)
|
||||
#define STORAGE_OVERLAP(x) 0
|
||||
#define STORAGE_ALIGN_BUFFER(start, size)
|
||||
#endif
|
||||
|
||||
/* Double-cast to avoid 'dereferencing type-punned pointer will
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue