+2003-06-07 Casper S. Hornstrup <chorns@users.sourceforge.net>
+
+ Changes for compiling with w32api
+
+ * include/ddk/cctypes.h (PREACTOS_COMMON_FCB_HEADER): Remove.
+ (FSRTL_COMMON_FCB_HEADER): Add.
+ * include/ddk/iotypes.h (FILE_OBJECT): Rename field
+ SectionObjectPointers to SectionObjectPointer.
+ * ntoskrnl/cc/copy.c, ntoskrnl/cc/misc.c, ntoskrnl/cc/pin.c,
+ ntoskrnl/cc/view.c, ntoskrnl/io/rawfs.c, ntoskrnl/mm/section.c,
+ drivers/fs/cdfs/cleanup.c, drivers/fs/cdfs/fcb.c,
+ drivers/fs/cdfs/fsctl.c, drivers/fs/ntfs/fcb.c, drivers/fs/ntfs/fsctl.c,
+ drivers/fs/vfat/close.c, drivers/fs/vfat/create.c,
+ drivers/fs/vfat/finfo.c, drivers/fs/vfat/fcb.c, drivers/fs/vfat/fsctl.c:
+ Use new FILE_OBJECT structure.
+ * drivers/fs/cdfs/cdfs.h, drivers/fs/ntfs/ntfs.h, drivers/fs/vfat/vfat.h:
+ Use new FSRTL_COMMON_FCB_HEADER structure.
+ * drivers/net/afd/include/afd.h (FSRTL_COMMON_FCB_HEADER): Remove.
+ * include/ddk/ketypes.h (KQUEUE): Match w32api structure.
+ * ntoskrnl/ke/queue.c, ntoskrnl/ke/wait.c: Use new structure.
+ * ntoskrnl/ke/spinlock.c (KeAcquireSpinLockAtDpcLevel,
+ KeReleaseSpinLockFromDpcLevel): Undefine before declaring.
+
2003-06-07 Casper S. Hornstrup <chorns@users.sourceforge.net>
Changes for compiling with w32api
typedef struct _FCB
{
- REACTOS_COMMON_FCB_HEADER RFCB;
+ FSRTL_COMMON_FCB_HEADER RFCB;
SECTION_OBJECT_POINTERS SectionObjectPointers;
PFILE_OBJECT FileObject;
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: cleanup.c,v 1.3 2003/02/13 22:24:15 hbirr Exp $
+/* $Id: cleanup.c,v 1.4 2003/06/07 11:34:35 chorns Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
/* Uninitialize file cache if initialized for this file object. */
- if (FileObject->SectionObjectPointers && FileObject->SectionObjectPointers->SharedCacheMap)
+ if (FileObject->SectionObjectPointer && FileObject->SectionObjectPointer->SharedCacheMap)
{
CcRosReleaseFileCache (FileObject);
}
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: fcb.c,v 1.12 2003/02/13 22:24:15 hbirr Exp $
+/* $Id: fcb.c,v 1.13 2003/06/07 11:34:35 chorns Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
FileObject->Flags = FileObject->Flags | FO_FCB_IS_VALID |
FO_DIRECT_CACHE_PAGING_READ;
- FileObject->SectionObjectPointers = &Fcb->SectionObjectPointers;
+ FileObject->SectionObjectPointer = &Fcb->SectionObjectPointers;
FileObject->FsContext = Fcb;
FileObject->FsContext2 = newCCB;
newCCB->PtrFileObject = FileObject;
FileObject->Flags = FileObject->Flags | FO_FCB_IS_VALID |
FO_DIRECT_CACHE_PAGING_READ;
- FileObject->SectionObjectPointers = &Fcb->SectionObjectPointers;
+ FileObject->SectionObjectPointer = &Fcb->SectionObjectPointers;
FileObject->FsContext = Fcb;
FileObject->FsContext2 = newCCB;
newCCB->PtrFileObject = FileObject;
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: fsctl.c,v 1.13 2003/02/13 22:24:15 hbirr Exp $
+/* $Id: fsctl.c,v 1.14 2003/06/07 11:34:35 chorns Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
DeviceExt->StreamFileObject->Flags = DeviceExt->StreamFileObject->Flags | FO_FCB_IS_VALID | FO_DIRECT_CACHE_PAGING_READ;
DeviceExt->StreamFileObject->FsContext = Fcb;
DeviceExt->StreamFileObject->FsContext2 = Ccb;
- DeviceExt->StreamFileObject->SectionObjectPointers = &Fcb->SectionObjectPointers;
+ DeviceExt->StreamFileObject->SectionObjectPointer = &Fcb->SectionObjectPointers;
DeviceExt->StreamFileObject->PrivateCacheMap = NULL;
DeviceExt->StreamFileObject->Vpb = DeviceExt->Vpb;
Ccb->PtrFileObject = DeviceExt->StreamFileObject;
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: fcb.c,v 1.5 2003/02/13 22:24:16 hbirr Exp $
+/* $Id: fcb.c,v 1.6 2003/06/07 11:34:35 chorns Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
FileObject->Flags = FileObject->Flags | FO_FCB_IS_VALID |
FO_DIRECT_CACHE_PAGING_READ;
- FileObject->SectionObjectPointers = &Fcb->SectionObjectPointers;
+ FileObject->SectionObjectPointer = &Fcb->SectionObjectPointers;
FileObject->FsContext = Fcb;
FileObject->FsContext2 = newCCB;
newCCB->PtrFileObject = FileObject;
FileObject->Flags = FileObject->Flags | FO_FCB_IS_VALID |
FO_DIRECT_CACHE_PAGING_READ;
- FileObject->SectionObjectPointers = &Fcb->SectionObjectPointers;
+ FileObject->SectionObjectPointer = &Fcb->SectionObjectPointers;
FileObject->FsContext = Fcb;
FileObject->FsContext2 = newCCB;
newCCB->PtrFileObject = FileObject;
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: fsctl.c,v 1.5 2003/02/13 22:24:16 hbirr Exp $
+/* $Id: fsctl.c,v 1.6 2003/06/07 11:34:36 chorns Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
DeviceExt->StreamFileObject->Flags = DeviceExt->StreamFileObject->Flags | FO_FCB_IS_VALID | FO_DIRECT_CACHE_PAGING_READ;
DeviceExt->StreamFileObject->FsContext = Fcb;
DeviceExt->StreamFileObject->FsContext2 = Ccb;
- DeviceExt->StreamFileObject->SectionObjectPointers = &Fcb->SectionObjectPointers;
+ DeviceExt->StreamFileObject->SectionObjectPointer = &Fcb->SectionObjectPointers;
DeviceExt->StreamFileObject->PrivateCacheMap = NULL;
DeviceExt->StreamFileObject->Vpb = DeviceExt->Vpb;
Ccb->PtrFileObject = DeviceExt->StreamFileObject;
typedef struct _FCB
{
- REACTOS_COMMON_FCB_HEADER RFCB;
+ FSRTL_COMMON_FCB_HEADER RFCB;
SECTION_OBJECT_POINTERS SectionObjectPointers;
PFILE_OBJECT FileObject;
-/* $Id: close.c,v 1.17 2003/02/13 22:24:16 hbirr Exp $
+/* $Id: close.c,v 1.18 2003/06/07 11:34:36 chorns Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
FileObject->FsContext2 = NULL;
FileObject->FsContext = NULL;
- FileObject->SectionObjectPointers = NULL;
+ FileObject->SectionObjectPointer = NULL;
if (pCcb)
{
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: create.c,v 1.56 2003/05/11 09:51:26 hbirr Exp $
+/* $Id: create.c,v 1.57 2003/06/07 11:34:36 chorns Exp $
*
* PROJECT: ReactOS kernel
* FILE: services/fs/vfat/create.c
Fcb->RFCB.ValidDataLength.QuadPart = 0;
/* Notify cache manager about the change in file size if caching is
initialized on the file stream */
- if (FileObject->SectionObjectPointers->SharedCacheMap != NULL)
+ if (FileObject->SectionObjectPointer->SharedCacheMap != NULL)
{
CcSetFileSizes(FileObject, (PCC_FILE_SIZES)&Fcb->RFCB.AllocationSize);
}
}
memset(pCcb, 0, sizeof(VFATCCB));
FileObject->Flags |= FO_FCB_IS_VALID;
- FileObject->SectionObjectPointers = &pFcb->SectionObjectPointers;
+ FileObject->SectionObjectPointer = &pFcb->SectionObjectPointers;
FileObject->FsContext = pFcb;
FileObject->FsContext2 = pCcb;
pFcb->RefCount++;
-/* $Id: fcb.c,v 1.28 2003/05/11 09:51:26 hbirr Exp $
+/* $Id: fcb.c,v 1.29 2003/06/07 11:34:36 chorns Exp $
*
*
* FILE: fcb.c
if (vfatFCBIsDirectory(pFCB))
{
/* Uninitialize file cache if initialized for this file object. */
- if (pFCB->FileObject->SectionObjectPointers->SharedCacheMap)
+ if (pFCB->FileObject->SectionObjectPointer->SharedCacheMap)
{
CcRosReleaseFileCache(pFCB->FileObject);
}
memset (newCCB, 0, sizeof (VFATCCB));
fileObject->Flags |= FO_FCB_IS_VALID | FO_DIRECT_CACHE_PAGING_READ;
- fileObject->SectionObjectPointers = &fcb->SectionObjectPointers;
+ fileObject->SectionObjectPointer = &fcb->SectionObjectPointers;
fileObject->FsContext = fcb;
fileObject->FsContext2 = newCCB;
fcb->FileObject = fileObject;
fileObject->Flags = fileObject->Flags | FO_FCB_IS_VALID |
FO_DIRECT_CACHE_PAGING_READ;
- fileObject->SectionObjectPointers = &fcb->SectionObjectPointers;
+ fileObject->SectionObjectPointer = &fcb->SectionObjectPointers;
fileObject->FsContext = fcb;
fileObject->FsContext2 = newCCB;
DPRINT ("file open: fcb:%x file size: %d\n", fcb, fcb->entry.FileSize);
-/* $Id: finfo.c,v 1.29 2003/06/04 18:01:02 hbirr Exp $
+/* $Id: finfo.c,v 1.30 2003/06/07 11:34:36 chorns Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
}
if (DispositionInfo->DoDeleteFile)
{
- if (MmFlushImageSection (FileObject->SectionObjectPointers, MmFlushForDelete))
+ if (MmFlushImageSection (FileObject->SectionObjectPointer, MmFlushForDelete))
{
KeAcquireSpinLock (&DeviceExt->FcbListLock, &oldIrql);
count = FCB->RefCount;
if (FCB->RefCount > 1)
{
- DPRINT1("%d %x\n", FCB->RefCount, CcGetFileObjectFromSectionPtrs(FileObject->SectionObjectPointers));
+ DPRINT1("%d %x\n", FCB->RefCount, CcGetFileObjectFromSectionPtrs(FileObject->SectionObjectPointer));
Status = STATUS_ACCESS_DENIED;
}
else
Fcb->RFCB.FileSize.QuadPart = Size;
Fcb->RFCB.ValidDataLength.QuadPart = Size;
- if (FileObject->SectionObjectPointers->SharedCacheMap != NULL)
+ if (FileObject->SectionObjectPointer->SharedCacheMap != NULL)
{
CcSetFileSizes(FileObject, (PCC_FILE_SIZES)&Fcb->RFCB.AllocationSize);
}
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: fsctl.c,v 1.15 2003/05/11 09:51:26 hbirr Exp $
+/* $Id: fsctl.c,v 1.16 2003/06/07 11:34:36 chorns Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
DeviceExt->FATFileObject->Flags = DeviceExt->FATFileObject->Flags | FO_FCB_IS_VALID | FO_DIRECT_CACHE_PAGING_READ;
DeviceExt->FATFileObject->FsContext = Fcb;
DeviceExt->FATFileObject->FsContext2 = Ccb;
- DeviceExt->FATFileObject->SectionObjectPointers = &Fcb->SectionObjectPointers;
+ DeviceExt->FATFileObject->SectionObjectPointer = &Fcb->SectionObjectPointers;
DeviceExt->FATFileObject->PrivateCacheMap = NULL;
DeviceExt->FATFileObject->Vpb = DeviceObject->Vpb;
Fcb->FileObject = DeviceExt->FATFileObject;
-/* $Id: vfat.h,v 1.57 2003/05/11 09:51:26 hbirr Exp $ */
+/* $Id: vfat.h,v 1.58 2003/06/07 11:34:36 chorns Exp $ */
#include <ddk/ntifs.h>
typedef struct _VFATFCB
{
/* FCB header required by ROS/NT */
- REACTOS_COMMON_FCB_HEADER RFCB;
+ FSRTL_COMMON_FCB_HEADER RFCB;
SECTION_OBJECT_POINTERS SectionObjectPointers;
ERESOURCE MainResource;
ERESOURCE PagingIoResource;
/* Flags for CCB structure */
#define CCB_CLEANED 0x00000001
-/* Borrowed from http://www.acc.umu.se/~bosse/ntifs.h by Bo Branten */
-typedef struct _FSRTL_COMMON_FCB_HEADER {
- CSHORT NodeTypeCode;
- CSHORT NodeByteSize;
- UCHAR Flags;
- UCHAR IsFastIoPossible;
- UCHAR Flags2;
- UCHAR Reserved;
- PERESOURCE Resource;
- PERESOURCE PagingIoResource;
- LARGE_INTEGER AllocationSize;
- LARGE_INTEGER FileSize;
- LARGE_INTEGER ValidDataLength;
-} FSRTL_COMMON_FCB_HEADER, *PFSRTL_COMMON_FCB_HEADER;
-
typedef struct _FsdNTRequiredFCB {
FSRTL_COMMON_FCB_HEADER CommonFCBHeader;
SECTION_OBJECT_POINTERS SectionObject;
(*PFLUSH_TO_LSN)(IN PVOID LogHandle,
IN LARGE_INTEGER Lsn);
-typedef struct _REACTOS_COMMON_FCB_HEADER
-{
- CSHORT NodeTypeCode;
- CSHORT NodeByteSize;
- LARGE_INTEGER AllocationSize;
- LARGE_INTEGER FileSize;
- LARGE_INTEGER ValidDataLength;
-} REACTOS_COMMON_FCB_HEADER, *PREACTOS_COMMON_FCB_HEADER;
+typedef struct _FSRTL_COMMON_FCB_HEADER {
+ CSHORT NodeTypeCode;
+ CSHORT NodeByteSize;
+ UCHAR Flags;
+ UCHAR IsFastIoPossible;
+ UCHAR Flags2;
+ UCHAR Reserved;
+ PERESOURCE Resource;
+ PERESOURCE PagingIoResource;
+ LARGE_INTEGER AllocationSize;
+ LARGE_INTEGER FileSize;
+ LARGE_INTEGER ValidDataLength;
+} FSRTL_COMMON_FCB_HEADER, *PFSRTL_COMMON_FCB_HEADER;
#endif /* __INCLUDE_DDK_CCTYPES_H */
-/* $Id: iotypes.h,v 1.48 2003/05/28 18:09:09 chorns Exp $
+/* $Id: iotypes.h,v 1.49 2003/06/07 11:34:36 chorns Exp $
*
*/
struct _VPB* Vpb;
PVOID FsContext;
PVOID FsContext2;
- PSECTION_OBJECT_POINTERS SectionObjectPointers;
+ PSECTION_OBJECT_POINTERS SectionObjectPointer;
PVOID PrivateCacheMap;
NTSTATUS FinalStatus;
struct _FILE_OBJECT* RelatedFileObject;
{
DISPATCHER_HEADER Header;
LIST_ENTRY EntryListHead;
- ULONG RunningThreads;
- ULONG MaximumThreads;
+ ULONG CurrentCount;
+ ULONG MaximumCount;
LIST_ENTRY ThreadListHead;
} KQUEUE, *PKQUEUE;
-/* $Id: copy.c,v 1.16 2003/05/25 21:50:18 hbirr Exp $
+/* $Id: copy.c,v 1.17 2003/06/07 11:34:36 chorns Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
FileObject, (ULONG)FileOffset->QuadPart, Length, Wait,
Buffer, IoStatus);
- Bcb = FileObject->SectionObjectPointers->SharedCacheMap;
+ Bcb = FileObject->SectionObjectPointer->SharedCacheMap;
ReadOffset = FileOffset->QuadPart;
DPRINT("AllocationSize %d, FileSize %d\n",
"Length %d, Wait %d, Buffer %x)\n",
FileObject, (ULONG)FileOffset->QuadPart, Length, Wait, Buffer);
- Bcb = FileObject->SectionObjectPointers->SharedCacheMap;
+ Bcb = FileObject->SectionObjectPointer->SharedCacheMap;
WriteOffset = (ULONG)FileOffset->QuadPart;
if (!Wait)
Length = EndOffset->u.LowPart - StartOffset->u.LowPart;
- if (FileObject->SectionObjectPointers->SharedCacheMap == NULL)
+ if (FileObject->SectionObjectPointer->SharedCacheMap == NULL)
{
/* File is not cached */
WriteOffset.QuadPart = StartOffset->QuadPart;
PHYSICAL_ADDRESS page;
Start = StartOffset->u.LowPart;
- Bcb = FileObject->SectionObjectPointers->SharedCacheMap;
+ Bcb = FileObject->SectionObjectPointer->SharedCacheMap;
if (Wait)
{
/* testing, if the requested datas are available */
(ULONG)FileSizes->FileSize.QuadPart,
(ULONG)FileSizes->ValidDataLength.QuadPart);
- Bcb = FileObject->SectionObjectPointers->SharedCacheMap;
+ Bcb = FileObject->SectionObjectPointer->SharedCacheMap;
assert(Bcb);
if (FileSizes->AllocationSize.QuadPart < Bcb->AllocationSize.QuadPart)
-/* $Id: pin.c,v 1.11 2003/02/13 22:24:18 hbirr Exp $
+/* $Id: pin.c,v 1.12 2003/06/07 11:34:36 chorns Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
Length, Wait, pBcb, pBuffer);
ReadOffset = FileOffset->QuadPart;
- Bcb = FileObject->SectionObjectPointers->SharedCacheMap;
+ Bcb = FileObject->SectionObjectPointer->SharedCacheMap;
assert(Bcb);
DPRINT("AllocationSize %d, FileSize %d\n",
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: view.c,v 1.61 2003/06/06 21:02:42 hbirr Exp $
+/* $Id: view.c,v 1.62 2003/06/07 11:34:36 chorns Exp $
*
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/cc/view.c
Bcb->RefCount++;
ExReleaseFastMutex(&ViewLock);
- CcFlushCache(FileObject->SectionObjectPointers, NULL, 0, NULL);
+ CcFlushCache(FileObject->SectionObjectPointer, NULL, 0, NULL);
ExAcquireFastMutex(&ViewLock);
Bcb->RefCount--;
Bcb->BcbRemoveListEntry.Flink = NULL;
}
- FileObject->SectionObjectPointers->SharedCacheMap = NULL;
+ FileObject->SectionObjectPointer->SharedCacheMap = NULL;
/*
* Release all cache segments.
{
PBCB Bcb;
ExAcquireFastMutex(&ViewLock);
- Bcb = (PBCB)FileObject->SectionObjectPointers->SharedCacheMap;
+ Bcb = (PBCB)FileObject->SectionObjectPointer->SharedCacheMap;
assert(Bcb);
if (Bcb->RefCount == 0)
{
{
PBCB Bcb;
ExAcquireFastMutex(&ViewLock);
- Bcb = (PBCB)FileObject->SectionObjectPointers->SharedCacheMap;
+ Bcb = (PBCB)FileObject->SectionObjectPointer->SharedCacheMap;
assert(Bcb);
if (Bcb->RefCount > 0)
{
ExAcquireFastMutex(&ViewLock);
- if (FileObject->SectionObjectPointers->SharedCacheMap != NULL)
+ if (FileObject->SectionObjectPointer->SharedCacheMap != NULL)
{
- Bcb = FileObject->SectionObjectPointers->SharedCacheMap;
+ Bcb = FileObject->SectionObjectPointer->SharedCacheMap;
if (FileObject->PrivateCacheMap != NULL)
{
FileObject->PrivateCacheMap = NULL;
ExAcquireFastMutex(&ViewLock);
- Bcb = FileObject->SectionObjectPointers->SharedCacheMap;
+ Bcb = FileObject->SectionObjectPointer->SharedCacheMap;
if (Bcb == NULL)
{
Bcb = ExAllocateFromNPagedLookasideList(&BcbLookasideList);
if (FileObject->FsContext)
{
Bcb->AllocationSize =
- ((REACTOS_COMMON_FCB_HEADER*)FileObject->FsContext)->AllocationSize;
+ ((PFSRTL_COMMON_FCB_HEADER)FileObject->FsContext)->AllocationSize;
Bcb->FileSize =
- ((REACTOS_COMMON_FCB_HEADER*)FileObject->FsContext)->FileSize;
+ ((PFSRTL_COMMON_FCB_HEADER)FileObject->FsContext)->FileSize;
}
KeInitializeSpinLock(&Bcb->BcbLock);
InitializeListHead(&Bcb->BcbSegmentListHead);
- FileObject->SectionObjectPointers->SharedCacheMap = Bcb;
+ FileObject->SectionObjectPointer->SharedCacheMap = Bcb;
}
if (FileObject->PrivateCacheMap == NULL)
{
-/* $Id: rawfs.c,v 1.2 2003/05/15 13:34:37 ekohl Exp $
+/* $Id: rawfs.c,v 1.3 2003/06/07 11:34:36 chorns Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
typedef struct _RAWFS_FCB
{
/* Start FCB header required by ReactOS/Windows NT */
- REACTOS_COMMON_FCB_HEADER RFCB;
+ FSRTL_COMMON_FCB_HEADER RFCB;
SECTION_OBJECT_POINTERS SectionObjectPointers;
ERESOURCE MainResource;
ERESOURCE PagingIoResource;
}
FileObject->Flags |= FO_FCB_IS_VALID;
- FileObject->SectionObjectPointers = &pFcb->SectionObjectPointers;
+ FileObject->SectionObjectPointer = &pFcb->SectionObjectPointers;
FileObject->FsContext = pFcb;
FileObject->FsContext2 = pCcb;
pFcb->RefCount++;
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: queue.c,v 1.5 2003/03/19 23:10:31 gdalsnes Exp $
+/* $Id: queue.c,v 1.6 2003/06/07 11:34:36 chorns Exp $
*
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/ke/queue.c
0);
InitializeListHead(&Queue->EntryListHead);
InitializeListHead(&Queue->ThreadListHead);
- Queue->RunningThreads = 0;
- Queue->MaximumThreads = (Count == 0) ? (ULONG) KeNumberProcessors : Count;
+ Queue->CurrentCount = 0;
+ Queue->MaximumCount = (Count == 0) ? (ULONG) KeNumberProcessors : Count;
}
InsertTailList(&Queue->EntryListHead, Entry);
}
- if (Queue->RunningThreads < Queue->MaximumThreads && InitialState == 0)
+ if (Queue->CurrentCount < Queue->MaximumCount && InitialState == 0)
{
KeDispatcherObjectWake(&Queue->Header);
}
//associate with this queue
InsertHeadList(&Queue->ThreadListHead, &Thread->QueueListEntry);
- Queue->RunningThreads++;
+ Queue->CurrentCount++;
Thread->Queue = Queue;
}
- if (Queue->RunningThreads <= Queue->MaximumThreads && !IsListEmpty(&Queue->EntryListHead))
+ if (Queue->CurrentCount <= Queue->MaximumCount && !IsListEmpty(&Queue->EntryListHead))
{
ListEntry = RemoveHeadList(&Queue->EntryListHead);
Queue->Header.SignalState--;
-/* $Id: spinlock.c,v 1.15 2003/06/07 10:37:50 chorns Exp $
+/* $Id: spinlock.c,v 1.16 2003/06/07 11:34:36 chorns Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
*SpinLock = 0;
}
+#undef KeAcquireSpinLockAtDpcLevel
+
VOID STDCALL
KeAcquireSpinLockAtDpcLevel (PKSPIN_LOCK SpinLock)
/*
}
}
+#undef KeReleaseSpinLockFromDpcLevel
+
VOID STDCALL
KeReleaseSpinLockFromDpcLevel (PKSPIN_LOCK SpinLock)
/*
//io completion
if (CurrentThread->Queue)
{
- CurrentThread->Queue->RunningThreads--;
- if (WaitReason != WrQueue && CurrentThread->Queue->RunningThreads < CurrentThread->Queue->MaximumThreads &&
+ CurrentThread->Queue->CurrentCount--;
+ if (WaitReason != WrQueue && CurrentThread->Queue->CurrentCount < CurrentThread->Queue->MaximumCount &&
!IsListEmpty(&CurrentThread->Queue->EntryListHead))
{
KeDispatcherObjectWake(&CurrentThread->Queue->Header);
//io completion
if (CurrentThread->Queue)
{
- CurrentThread->Queue->RunningThreads++;
+ CurrentThread->Queue->CurrentCount++;
}
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: section.c,v 1.114 2003/06/06 21:00:28 hbirr Exp $
+/* $Id: section.c,v 1.115 2003/06/07 11:34:36 chorns Exp $
*
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/mm/section.c
VOID
MmFreeSectionSegments(PFILE_OBJECT FileObject)
{
- if (FileObject->SectionObjectPointers->ImageSectionObject != NULL)
+ if (FileObject->SectionObjectPointer->ImageSectionObject != NULL)
{
PMM_IMAGE_SECTION_OBJECT ImageSectionObject;
ULONG i;
ImageSectionObject =
- (PMM_IMAGE_SECTION_OBJECT)FileObject->SectionObjectPointers->
+ (PMM_IMAGE_SECTION_OBJECT)FileObject->SectionObjectPointer->
ImageSectionObject;
for (i = 0; i < ImageSectionObject->NrSegments; i++)
MmFreePageTablesSectionSegment(&ImageSectionObject->Segments[i]);
}
ExFreePool(ImageSectionObject);
- FileObject->SectionObjectPointers->ImageSectionObject = NULL;
+ FileObject->SectionObjectPointer->ImageSectionObject = NULL;
}
- if (FileObject->SectionObjectPointers->DataSectionObject != NULL)
+ if (FileObject->SectionObjectPointer->DataSectionObject != NULL)
{
PMM_SECTION_SEGMENT Segment;
- Segment = (PMM_SECTION_SEGMENT)FileObject->SectionObjectPointers->
+ Segment = (PMM_SECTION_SEGMENT)FileObject->SectionObjectPointer->
DataSectionObject;
if (Segment->ReferenceCount != 0)
}
MmFreePageTablesSectionSegment(Segment);
ExFreePool(Segment);
- FileObject->SectionObjectPointers->DataSectionObject = NULL;
+ FileObject->SectionObjectPointer->DataSectionObject = NULL;
}
}
(Offset + PAGE_SIZE <= Segment->RawLength || !IsImageSection))
{
NTSTATUS Status;
- Bcb = FileObject->SectionObjectPointers->SharedCacheMap;
+ Bcb = FileObject->SectionObjectPointer->SharedCacheMap;
Status = CcRosUnmapCacheSegment(Bcb, FileOffset, Dirty);
if (!NT_SUCCESS(Status))
{
PBCB Bcb;
PCACHE_SEGMENT CacheSeg;
- Bcb = MemoryArea->Data.SectionData.Section->FileObject->SectionObjectPointers->SharedCacheMap;
+ Bcb = MemoryArea->Data.SectionData.Section->FileObject->SectionObjectPointer->SharedCacheMap;
CacheSeg = CcRosLookupCacheSegment(Bcb, SegOffset + MemoryArea->Data.SectionData.Segment->FileOffset);
if (CacheSeg)
{
ULONG Length;
FileObject = MemoryArea->Data.SectionData.Section->FileObject;
- Bcb = FileObject->SectionObjectPointers->SharedCacheMap;
+ Bcb = FileObject->SectionObjectPointer->SharedCacheMap;
RawLength = MemoryArea->Data.SectionData.Segment->RawLength;
FileOffset = SegOffset + MemoryArea->Data.SectionData.Segment->FileOffset;
IsImageSection = MemoryArea->Data.SectionData.Section->AllocationAttributes & SEC_IMAGE ? TRUE : FALSE;
DirectMapped = FALSE;
if (FileObject != NULL)
{
- Bcb = FileObject->SectionObjectPointers->SharedCacheMap;
+ Bcb = FileObject->SectionObjectPointer->SharedCacheMap;
/*
* If the file system is letting us go directly to the cache and the
DirectMapped = FALSE;
if (FileObject != NULL)
{
- Bcb = FileObject->SectionObjectPointers->SharedCacheMap;
+ Bcb = FileObject->SectionObjectPointer->SharedCacheMap;
/*
* If the file system is letting us go directly to the cache and the
else
{
MaximumSize =
- ((PREACTOS_COMMON_FCB_HEADER)FileObject->FsContext)->FileSize;
+ ((PFSRTL_COMMON_FCB_HEADER)FileObject->FsContext)->FileSize;
}
if (MaximumSize.QuadPart >
- ((PREACTOS_COMMON_FCB_HEADER)FileObject->FsContext)->FileSize.QuadPart)
+ ((PFSRTL_COMMON_FCB_HEADER)FileObject->FsContext)->FileSize.QuadPart)
{
IO_STATUS_BLOCK Iosb;
Status = NtSetInformationFile(FileHandle,
* If this file hasn't been mapped as a data file before then allocate a
* section segment to describe the data file mapping
*/
- if (FileObject->SectionObjectPointers->DataSectionObject == NULL)
+ if (FileObject->SectionObjectPointer->DataSectionObject == NULL)
{
Segment = ExAllocatePoolWithTag(NonPagedPool, sizeof(MM_SECTION_SEGMENT),
TAG_MM_SECTION_SEGMENT);
ObDereferenceObject(FileObject);
return(Status);
}
- FileObject->SectionObjectPointers->DataSectionObject = (PVOID)Segment;
+ FileObject->SectionObjectPointer->DataSectionObject = (PVOID)Segment;
Segment->FileOffset = 0;
Segment->Protection = 0;
* to extend it
*/
Segment =
- (PMM_SECTION_SEGMENT)FileObject->SectionObjectPointers->
+ (PMM_SECTION_SEGMENT)FileObject->SectionObjectPointer->
DataSectionObject;
Section->Segments = Segment;
InterlockedIncrement((PLONG)&Segment->ReferenceCount);
* section segments to describe the mapping
*/
NrSegments = PEHeader.FileHeader.NumberOfSections + 1;
- if (FileObject->SectionObjectPointers->ImageSectionObject == NULL)
+ if (FileObject->SectionObjectPointer->ImageSectionObject == NULL)
{
ULONG i;
ULONG Size;
KeInitializeMutex(&SectionSegments[i].Lock, 0);
}
- FileObject->SectionObjectPointers->ImageSectionObject =
+ FileObject->SectionObjectPointer->ImageSectionObject =
(PVOID)ImageSectionObject;
}
else
ULONG i;
ImageSectionObject = (PMM_IMAGE_SECTION_OBJECT)
- FileObject->SectionObjectPointers->ImageSectionObject;
+ FileObject->SectionObjectPointer->ImageSectionObject;
SectionSegments = ImageSectionObject->Segments;
Section->Segments = SectionSegments;
if (PhysAddr.QuadPart == PAGE_FROM_SSE(Entry) && Dirty)
{
FileObject = MemoryArea->Data.SectionData.Section->FileObject;
- Bcb = FileObject->SectionObjectPointers->SharedCacheMap;
+ Bcb = FileObject->SectionObjectPointer->SharedCacheMap;
CcRosMarkDirtyCacheSegment(Bcb, Offset);
assert(SwapEntry == 0);
}