alsa.audio: move handling of XRUN when writting to the slave task
[AROS.git] / rom / filesys / afs / cache.h
blob808564d279ef0b9b1ef9136628960ad91f63af02
1 #ifndef BLOCKACCESS_H
2 #define BLOCKACCESS_H
4 /*
5 Copyright © 1995-2005, The AROS Development Team. All rights reserved.
6 $Id$
7 */
9 #include "os.h"
10 #include "volumes.h"
12 struct BlockCache {
13 struct BlockCache *next;
14 ULONG newness;
15 ULONG blocknum; /* zero means block is empty */
16 ULONG *buffer;
17 ULONG flags;
20 #define BCF_USED 1
21 #define BCF_WRITE 2
23 struct BlockCache *initCache(struct AFSBase *, struct Volume *volume, ULONG);
24 void freeCache(struct AFSBase *, struct BlockCache *);
25 struct BlockCache *getFreeCacheBlock(struct AFSBase *, struct Volume *, ULONG);
26 struct BlockCache *getBlock(struct AFSBase *, struct Volume *, ULONG);
27 LONG writeBlock(struct AFSBase *, struct Volume *, struct BlockCache *, LONG);
28 VOID writeBlockDeferred(struct AFSBase *, struct Volume *, struct BlockCache *, LONG);
29 void clearCache(struct AFSBase *, struct BlockCache *);
30 VOID flushCache(struct AFSBase *, struct Volume *);
31 void checkCache(struct AFSBase *, struct Volume *);
33 #endif