2 # _____ ___ ____ ___ ____
3 # ____| | ____| | | |____|
4 # | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5 #-----------------------------------------------------------------------
6 # Copyright 2001-2004, ps2dev - http://www.ps2dev.org
7 # Licenced under Academic Free License version 2.0
8 # Review ps2sdk README & LICENSE files for further details.
10 # $Id: cache.h 577 2004-09-14 14:41:46Z pixel $
16 #define CACHE_FLAG_DIRTY 0x01
17 typedef struct sapa_cache
19 struct sapa_cache
*next
;
20 struct sapa_cache
*tail
;
28 ///////////////////////////////////////////////////////////////////////////////
29 // Function declerations
31 int cacheInit(u32 size
);
32 void cacheLink(apa_cache
*clink
, apa_cache
*cnew
);
33 apa_cache
*cacheUnLink(apa_cache
*clink
);
34 int cacheTransfer(apa_cache
*clink
, int type
);
35 void cacheFlushDirty(apa_cache
*clink
);
36 int cacheFlushAllDirty(u32 device
);
37 apa_cache
*cacheGetHeader(u32 device
, u32 sector
, u32 mode
, int *err
);
38 void cacheAdd(apa_cache
*clink
);
39 apa_cache
*cacheGetFree();