alsa.audio: move handling of XRUN when writting to the slave task
[AROS.git] / rom / filesys / SFS / FS / transactions.h
blobe40cc9aba58756939ee3ca991691f3318621c72c
1 #ifndef _TRANSACTIONS_H
2 #define _TRANSACTIONS_H
4 #include <exec/types.h>
5 #include <libraries/iffparse.h>
6 #include "blockstructure.h"
7 #include "redblacktree.h"
9 /* Operation : A single block modification
10 Transaction : A series of block modifications which together result in a valid disk */
12 struct OperationInformation {
13 UWORD length; /* Length in bytes of the compressed data. */
14 BLCK blckno;
15 UBYTE bits; /* See defines below. */
16 UBYTE data[0];
19 /* Defines for bits: */
21 #define OI_EMPTY (1) /* When set indicates that this block has no original. */
22 #define OI_DELETE (2) /* When set indicates that this block does not need to be written
23 anymore (ie, when blocks become unused and marked free). */
26 struct Operation {
27 struct Operation *left;
28 struct Operation *right;
29 struct Operation *parent;
30 #ifdef CHECKCODE_TRANSACTIONS
31 UWORD magicvalue;
32 #endif
33 NodeColor color;
34 UBYTE new;
36 // struct Operation *next;
37 // struct Operation *previous;
39 struct OperationInformation oi;
43 #define TRANSACTIONSTORAGE_ID AROS_LONG2BE(MAKE_ID('T','R','S','T'))
44 #define TRANSACTIONFAILURE_ID AROS_LONG2BE(MAKE_ID('T','R','F','A'))
45 #define TRANSACTIONOK_ID AROS_LONG2BE(MAKE_ID('T','R','O','K'))
47 /* The blocks used for storing the Transaction buffer are linked in a
48 singly linked list. The data they hold is a direct copy of all
49 Transaction data. */
51 struct fsTransactionStorage {
52 struct fsBlockHeader bheader;
54 BLCK be_next;
56 UBYTE data[0];
60 struct fsTransactionFailure {
61 struct fsBlockHeader bheader;
63 BLCK be_firsttransaction;
66 #endif // _TRANSACTIONS_H