revert between 56095 -> 55830 in arch
[AROS.git] / rom / filesys / SFS / FS / locks.h
blobbc1e18fa83915dcc12e24774718de58e5d4b76c4
1 #ifndef _LOCKS_H
2 #define _LOCKS_H
4 #include <dos/dos.h>
5 #include <exec/types.h>
6 #include "nodes.h"
8 struct ExtFileLock
10 BPTR link;
11 IPTR objectnode;
12 LONG access;
13 struct MsgPort *task;
14 BPTR volume;
15 /* structure above is the same as the FileLock structure */
17 struct ExtFileLock *next;
18 struct ExtFileLock *prev;
19 ULONG id;
21 struct GlobalHandle *gh;
23 /* EXAMINE_OBJECT and EXAMINE_NEXT use these: */
25 NODE currentnode;
26 NODE nextnode; /* ObjectNode number, 0 means get first entry */
27 BLCK nextnodeblock;
29 /* Used to keep track of the filepointer. */
31 BLCK curextent; /* This can be zero to indicate the start of the file, even if there ARE extents! */
32 ULONG extentoffset; /* Byte offset in current extent. 0 = start of extent */
33 ULONG offset; /* Byte offset in entire file. 0 = start of file */
35 /* If the file-ptr is located at the first byte AFTER the end of the file
36 (so the file can be extended) then offset==size. curextent should in that
37 case be the last link the file has (or zero if it has no links) */
39 /* Used for setting the Roving Block ptr when a file is closed which was
40 extended. A value of zero indicates the file was not extended. Otherwise
41 the value is the last block of the file + 1. */
43 ULONG lastextendedblock;
45 UBYTE bits; /* EFL_MODIFIED : if file was newly created (FINDOUTPUT or FINDUPDATE) or
46 modified by using ACTION_WRITE or ACTION_SET_FILE_SIZE
47 then this bit is set.
49 EFL_FILE : When set, indicates that the lock refers to a file. */
53 #define EFL_MODIFIED (1)
54 #define EFL_FILE (2)
58 struct GlobalHandle {
59 /* Structure which stores information on a specific file. This structure
60 is pointed to by all locks which currently have this file open. */
62 struct MinNode node;
64 ULONG count; /* Number of locks referencing this globalhandle */
66 NODE objectnode; /* The file's ObjectNode */
67 ULONG size; /* Size of the file in bytes */
68 ULONG protection; /* The protection bits of the file */
70 ULONG data; /* The first data block of this file (ExtentBNode) */
72 ULONG pad1; /* Extra bytes to prevent weird CVision3D monitor crash... */
73 ULONG pad2;
75 // BLCK startblock; /* First block of this link */
76 // UWORD blocks; /* Blocks in this link */
80 #endif // _LOCKS_H