diff --git a/reactos/include/ddk/fsfuncs.h b/reactos/include/ddk/fsfuncs.h index 72434d5bc4d..51adca6cfa5 100644 --- a/reactos/include/ddk/fsfuncs.h +++ b/reactos/include/ddk/fsfuncs.h @@ -1,8 +1,23 @@ #ifndef __INCLUDE_DDK_FSFUNCS_H #define __INCLUDE_DDK_FSFUNCS_H -/* $Id: fsfuncs.h,v 1.16 2002/09/08 10:47:44 chorns Exp $ */ +/* $Id: fsfuncs.h,v 1.17 2002/11/07 02:44:49 robd Exp $ */ #define FlagOn(x,f) ((x) & (f)) +VOID +STDCALL +FsRtlFreeFileLock( + IN PFILE_LOCK FileLock + ); + +PFILE_LOCK +STDCALL +FsRtlAllocateFileLock ( + IN PCOMPLETE_LOCK_IRP_ROUTINE CompleteLockIrpRoutine OPTIONAL, + IN PUNLOCK_ROUTINE UnlockRoutine OPTIONAL + ); + +#define FsRtlAreThereCurrentFileLocks(FL) (((FL)->FastIoIsQuestionable)) + BOOLEAN STDCALL FsRtlAddLargeMcbEntry(IN PLARGE_MCB Mcb, IN LONGLONG Vbn, diff --git a/reactos/include/ddk/fstypes.h b/reactos/include/ddk/fstypes.h index 0bc69931523..5b9c0f90ede 100644 --- a/reactos/include/ddk/fstypes.h +++ b/reactos/include/ddk/fstypes.h @@ -1,6 +1,6 @@ #ifndef __INCLUDE_DDK_FSTYPES_H #define __INCLUDE_DDK_FSTYPES_H -/* $Id: fstypes.h,v 1.7 2002/09/08 10:47:44 chorns Exp $ */ +/* $Id: fstypes.h,v 1.8 2002/11/07 02:44:49 robd Exp $ */ #define FSRTL_TAG TAG('F','S','r','t') @@ -14,6 +14,23 @@ typedef struct _FILE_LOCK_INFO { LARGE_INTEGER EndingByte; } FILE_LOCK_INFO, *PFILE_LOCK_INFO; +typedef struct _FILE_LOCK_TOC { + KSPIN_LOCK SpinLock; + LIST_ENTRY GrantedListHead; + LIST_ENTRY PendingListHead; +} FILE_LOCK_TOC, *PFILE_LOCK_TOC; + +typedef struct _FILE_LOCK_GRANTED { + LIST_ENTRY ListEntry; + FILE_LOCK_INFO Lock; +} FILE_LOCK_GRANTED, *PFILE_LOCK_GRANTED; + +typedef struct _FILE_LOCK_PENDING { + LIST_ENTRY ListEntry; + PIRP Irp; + PVOID Context; +} FILE_LOCK_PENDING, *PFILE_LOCK_PENDING; + // raw internal file lock struct returned from FsRtlGetNextFileLock typedef struct _FILE_SHARED_LOCK_ENTRY { PVOID Unknown1; diff --git a/reactos/include/ddk/iodef.h b/reactos/include/ddk/iodef.h index 4d199cd27a8..4d0b4e967d4 100644 --- a/reactos/include/ddk/iodef.h +++ b/reactos/include/ddk/iodef.h @@ -248,6 +248,14 @@ enum #define IRP_MJ_SCSI IRP_MJ_INTERNAL_DEVICE_CONTROL +/* + * Minor function numbers for IRP_MJ_LOCK_CONTROL + */ +#define IRP_MN_LOCK 0x01 +#define IRP_MN_UNLOCK_SINGLE 0x02 +#define IRP_MN_UNLOCK_ALL 0x03 +#define IRP_MN_UNLOCK_ALL_BY_KEY 0x04 + /* * Minor function numbers for IRP_MJ_FILE_SYSTEM_CONTROL */ diff --git a/reactos/include/ddk/iotypes.h b/reactos/include/ddk/iotypes.h index 5cff95c9796..1426a4ec44a 100644 --- a/reactos/include/ddk/iotypes.h +++ b/reactos/include/ddk/iotypes.h @@ -1,4 +1,4 @@ -/* $Id: iotypes.h,v 1.43 2002/10/05 10:53:36 dwelch Exp $ +/* $Id: iotypes.h,v 1.44 2002/11/07 02:44:49 robd Exp $ * */ @@ -432,6 +432,14 @@ typedef struct __attribute__((packed)) _IO_STACK_LOCATION struct _SCSI_REQUEST_BLOCK *Srb; } Scsi; + //byte range file locking + struct + { + PLARGE_INTEGER Length; + ULONG Key; + LARGE_INTEGER ByteOffset; + } LockControl; + /* Paramters for other calls */ struct { diff --git a/reactos/include/ntos/heap.h b/reactos/include/ntos/heap.h index 5efac191de1..391d638d572 100644 --- a/reactos/include/ntos/heap.h +++ b/reactos/include/ntos/heap.h @@ -18,7 +18,7 @@ #define HEAP_NO_SERIALIZE (1) #define HEAP_ZERO_MEMORY (8) #define HEAP_REALLOC_IN_PLACE_ONLY (16) -#define HEAP_GROWABLE (32) +#define HEAP_GROWABLE (2) #define HEAP_NO_VALLOC (64) #endif /* __INCLUDE_HEAP_H */