1
0
Fork 0
forked from len0rd/rockbox

iPod Classic CE-ATA Support (Part 1 of 4: Cacheline align some statically allocated sector buffers)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29444 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Michael Sparmann 2011-02-27 22:44:30 +00:00
parent b25f17200f
commit 751303c2ac
5 changed files with 12 additions and 10 deletions

View file

@ -39,7 +39,7 @@
*/
struct filedesc {
unsigned char cache[SECTOR_SIZE];
unsigned char cache[SECTOR_SIZE] CACHEALIGN_ATTR;
int cacheoffset; /* invariant: 0 <= cacheoffset <= SECTOR_SIZE */
long fileoffset;
long size;
@ -49,9 +49,9 @@ struct filedesc {
bool write;
bool dirty;
bool trunc;
};
} CACHEALIGN_ATTR;
static struct filedesc openfiles[MAX_OPEN_FILES];
static struct filedesc openfiles[MAX_OPEN_FILES] CACHEALIGN_ATTR;
static int flush_cache(int fd);