Author: ion
Date: Thu May 25 00:13:47 2006
New Revision: 22016
URL:
http://svn.reactos.ru/svn/reactos?rev=22016&view=rev
Log:
- Wipe out PROS_OBJECT_HEADER and use OBJECT_HEADER since we are now compatible.
Modified:
trunk/reactos/include/ndk/obtypes.h
trunk/reactos/ntoskrnl/include/internal/ex.h
trunk/reactos/ntoskrnl/include/internal/ob.h
trunk/reactos/ntoskrnl/ob/handle.c
trunk/reactos/ntoskrnl/ob/namespc.c
trunk/reactos/ntoskrnl/ob/ntobj.c
trunk/reactos/ntoskrnl/ob/object.c
trunk/reactos/ntoskrnl/ob/security.c
trunk/reactos/ntoskrnl/ob/wait.c
trunk/reactos/ntoskrnl/se/semgr.c
Modified: trunk/reactos/include/ndk/obtypes.h
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/include/ndk/obtypes.h?rev=2…
==============================================================================
--- trunk/reactos/include/ndk/obtypes.h (original)
+++ trunk/reactos/include/ndk/obtypes.h Thu May 25 00:13:47 2006
@@ -417,6 +417,19 @@
} OBJECT_HEADER, *POBJECT_HEADER;
//
+// Object Lookup Context
+//
+typedef struct _OBP_LOOKUP_CONTEXT
+{
+ POBJECT_DIRECTORY Directory;
+ PVOID Object;
+ ULONG HashValue;
+ USHORT HashIndex;
+ BOOLEAN DirectoryLocked;
+ ULONG LockStateSignature;
+} OBP_LOOKUP_CONTEXT, *POBP_LOOKUP_CONTEXT;
+
+//
// Device Map
//
typedef struct _DEVICE_MAP
Modified: trunk/reactos/ntoskrnl/include/internal/ex.h
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/ntoskrnl/include/internal/e…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/ex.h (original)
+++ trunk/reactos/ntoskrnl/include/internal/ex.h Thu May 25 00:13:47 2006
@@ -8,10 +8,10 @@
extern ULONG ExpTimeZoneId;
extern POBJECT_TYPE ExEventPairObjectType;
-#define EX_OBJ_TO_HDR(eob) ((PROS_OBJECT_HEADER)((ULONG_PTR)(eob) & \
+#define EX_OBJ_TO_HDR(eob) ((POBJECT_HEADER)((ULONG_PTR)(eob) & \
~(EX_HANDLE_ENTRY_PROTECTFROMCLOSE | EX_HANDLE_ENTRY_INHERITABLE | \
EX_HANDLE_ENTRY_AUDITONCLOSE)))
-#define EX_HTE_TO_HDR(hte) ((PROS_OBJECT_HEADER)((ULONG_PTR)((hte)->Object) & \
+#define EX_HTE_TO_HDR(hte) ((POBJECT_HEADER)((ULONG_PTR)((hte)->Object) & \
~(EX_HANDLE_ENTRY_PROTECTFROMCLOSE | EX_HANDLE_ENTRY_INHERITABLE | \
EX_HANDLE_ENTRY_AUDITONCLOSE)))
Modified: trunk/reactos/ntoskrnl/include/internal/ob.h
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/ntoskrnl/include/internal/o…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/ob.h (original)
+++ trunk/reactos/ntoskrnl/include/internal/ob.h Thu May 25 00:13:47 2006
@@ -11,40 +11,8 @@
struct _EPROCESS;
-typedef struct _ROS_OBJECT_HEADER
-{
- LONG PointerCount;
- union
- {
- LONG HandleCount;
- PVOID NextToFree;
- };
- POBJECT_TYPE Type;
- UCHAR NameInfoOffset;
- UCHAR HandleInfoOffset;
- UCHAR QuotaInfoOffset;
- UCHAR Flags;
- union
- {
- POBJECT_CREATE_INFORMATION ObjectCreateInfo;
- PVOID QuotaBlockCharged;
- };
- PSECURITY_DESCRIPTOR SecurityDescriptor;
- QUAD Body;
-} ROS_OBJECT_HEADER, *PROS_OBJECT_HEADER;
-
-typedef struct _OBP_LOOKUP_CONTEXT
-{
- POBJECT_DIRECTORY Directory;
- PVOID Object;
- ULONG HashValue;
- USHORT HashIndex;
- BOOLEAN DirectoryLocked;
- ULONG LockStateSignature;
-} OBP_LOOKUP_CONTEXT, *POBP_LOOKUP_CONTEXT;
-
#define BODY_TO_HEADER(objbdy) \
- CONTAINING_RECORD((objbdy), ROS_OBJECT_HEADER, Body)
+ CONTAINING_RECORD((objbdy), OBJECT_HEADER, Body)
#define HEADER_TO_OBJECT_NAME(objhdr) ((POBJECT_HEADER_NAME_INFO) \
(!(objhdr)->NameInfoOffset ? NULL: ((PCHAR)(objhdr) -
(objhdr)->NameInfoOffset)))
@@ -55,7 +23,7 @@
#define HEADER_TO_CREATOR_INFO(objhdr) ((POBJECT_HEADER_CREATOR_INFO) \
(!((objhdr)->Flags & OB_FLAG_CREATOR_INFO) ? NULL: ((PCHAR)(objhdr) -
sizeof(OBJECT_HEADER_CREATOR_INFO))))
-#define OBJECT_ALLOC_SIZE(ObjectSize) ((ObjectSize)+sizeof(ROS_OBJECT_HEADER))
+#define OBJECT_ALLOC_SIZE(ObjectSize) ((ObjectSize)+sizeof(OBJECT_HEADER))
#define KERNEL_HANDLE_FLAG (1 << ((sizeof(HANDLE) * 8) - 1))
#define ObIsKernelHandle(Handle, ProcessorMode) \
Modified: trunk/reactos/ntoskrnl/ob/handle.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/ntoskrnl/ob/handle.c?rev=22…
==============================================================================
--- trunk/reactos/ntoskrnl/ob/handle.c (original)
+++ trunk/reactos/ntoskrnl/ob/handle.c Thu May 25 00:13:47 2006
@@ -52,7 +52,7 @@
static VOID
ObpDecrementHandleCount(PVOID ObjectBody)
{
- PROS_OBJECT_HEADER ObjectHeader = BODY_TO_HEADER(ObjectBody);
+ POBJECT_HEADER ObjectHeader = BODY_TO_HEADER(ObjectBody);
LONG NewHandleCount = InterlockedDecrement(&ObjectHeader->HandleCount);
OBP_LOOKUP_CONTEXT Context;
DPRINT("Header: %x\n", ObjectHeader);
@@ -228,7 +228,7 @@
{
PHANDLE_TABLE_ENTRY HandleEntry;
PVOID Body;
- PROS_OBJECT_HEADER ObjectHeader;
+ POBJECT_HEADER ObjectHeader;
PHANDLE_TABLE ObjectTable;
PAGED_CODE();
@@ -286,7 +286,7 @@
HANDLE_TABLE_ENTRY NewHandleEntry;
BOOLEAN AttachedToProcess = FALSE;
PVOID ObjectBody;
- PROS_OBJECT_HEADER ObjectHeader;
+ POBJECT_HEADER ObjectHeader;
ULONG NewHandleCount;
HANDLE NewTargetHandle;
PEPROCESS CurrentProcess;
@@ -625,7 +625,7 @@
ULONG GrantedAccess,
PVOID Context)
{
- PROS_OBJECT_HEADER ObjectHeader;
+ POBJECT_HEADER ObjectHeader;
PVOID ObjectBody;
PAGED_CODE();
@@ -641,7 +641,7 @@
PHANDLE_TABLE_ENTRY HandleTableEntry,
PVOID Context)
{
- PROS_OBJECT_HEADER ObjectHeader;
+ POBJECT_HEADER ObjectHeader;
BOOLEAN Ret = FALSE;
PAGED_CODE();
@@ -721,7 +721,7 @@
{
HANDLE_TABLE_ENTRY NewEntry;
PEPROCESS Process, CurrentProcess;
- PROS_OBJECT_HEADER ObjectHeader;
+ POBJECT_HEADER ObjectHeader;
HANDLE Handle;
KAPC_STATE ApcState;
BOOLEAN AttachedToProcess = FALSE;
@@ -889,7 +889,7 @@
POBJECT_HANDLE_INFORMATION HandleInformation)
{
PHANDLE_TABLE_ENTRY HandleEntry;
- PROS_OBJECT_HEADER ObjectHeader;
+ POBJECT_HEADER ObjectHeader;
PVOID ObjectBody;
ACCESS_MASK GrantedAccess;
ULONG Attributes;
@@ -1153,10 +1153,10 @@
OUT PHANDLE Handle)
{
POBJECT_CREATE_INFORMATION ObjectCreateInfo;
- PROS_OBJECT_HEADER Header;
+ POBJECT_HEADER Header;
POBJECT_HEADER_NAME_INFO ObjectNameInfo;
PVOID FoundObject = NULL;
- PROS_OBJECT_HEADER FoundHeader = NULL;
+ POBJECT_HEADER FoundHeader = NULL;
NTSTATUS Status = STATUS_SUCCESS;
UNICODE_STRING RemainingPath;
BOOLEAN ObjectAttached = FALSE;
@@ -1230,7 +1230,7 @@
ObjectNameInfo->Name.Buffer = NewName;
ObjectNameInfo->Name.Length = RemainingPath.Length - Delta;
ObjectNameInfo->Name.MaximumLength = RemainingPath.MaximumLength - Delta;
- ObpInsertEntryDirectory(FoundObject, &Context, (POBJECT_HEADER)Header);
+ ObpInsertEntryDirectory(FoundObject, &Context, Header);
ObjectAttached = TRUE;
}
Modified: trunk/reactos/ntoskrnl/ob/namespc.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/ntoskrnl/ob/namespc.c?rev=2…
==============================================================================
--- trunk/reactos/ntoskrnl/ob/namespc.c (original)
+++ trunk/reactos/ntoskrnl/ob/namespc.c Thu May 25 00:13:47 2006
@@ -50,7 +50,7 @@
PUNICODE_STRING ObjectName,
POBJECT_TYPE ObjectType,
ULONG ObjectSize,
- PROS_OBJECT_HEADER *ObjectHeader);
+ POBJECT_HEADER *ObjectHeader);
/* FUNCTIONS **************************************************************/
@@ -360,7 +360,7 @@
FALSE,
&Context))
{
- ObpInsertEntryDirectory(ObpTypeDirectoryObject, &Context,
(POBJECT_HEADER)BODY_TO_HEADER(ObTypeObjectType));
+ ObpInsertEntryDirectory(ObpTypeDirectoryObject, &Context,
BODY_TO_HEADER(ObTypeObjectType));
}
if (!ObpLookupEntryDirectory(ObpTypeDirectoryObject,
&HEADER_TO_OBJECT_NAME(BODY_TO_HEADER(ObDirectoryType))->Name,
@@ -368,7 +368,7 @@
FALSE,
&Context))
{
- ObpInsertEntryDirectory(ObpTypeDirectoryObject, &Context,
(POBJECT_HEADER)BODY_TO_HEADER(ObDirectoryType));
+ ObpInsertEntryDirectory(ObpTypeDirectoryObject, &Context,
BODY_TO_HEADER(ObDirectoryType));
}
/* Create 'symbolic link' object type */
@@ -385,7 +385,7 @@
PUNICODE_STRING TypeName,
POBJECT_TYPE *ObjectType)
{
- PROS_OBJECT_HEADER Header;
+ POBJECT_HEADER Header;
POBJECT_TYPE LocalObjectType;
ULONG HeaderSize;
NTSTATUS Status;
@@ -397,7 +397,7 @@
TypeName,
ObTypeObjectType,
OBJECT_ALLOC_SIZE(sizeof(OBJECT_TYPE)),
- (PROS_OBJECT_HEADER*)&Header);
+ (POBJECT_HEADER*)&Header);
if (!NT_SUCCESS(Status))
{
DPRINT1("ObpAllocateObject failed!\n");
@@ -443,7 +443,7 @@
}
/* Calculate how much space our header'll take up */
- HeaderSize = sizeof(ROS_OBJECT_HEADER) + sizeof(OBJECT_HEADER_NAME_INFO) +
+ HeaderSize = sizeof(OBJECT_HEADER) + sizeof(OBJECT_HEADER_NAME_INFO) +
(ObjectTypeInitializer->MaintainHandleCount ?
sizeof(OBJECT_HEADER_HANDLE_INFO) : 0);
@@ -499,7 +499,7 @@
OBJ_CASE_INSENSITIVE,
FALSE,
&Context);
- ObpInsertEntryDirectory(ObpTypeDirectoryObject, &Context,
(POBJECT_HEADER)Header);
+ ObpInsertEntryDirectory(ObpTypeDirectoryObject, &Context, Header);
ObReferenceObject(ObpTypeDirectoryObject);
}
Modified: trunk/reactos/ntoskrnl/ob/ntobj.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/ntoskrnl/ob/ntobj.c?rev=220…
==============================================================================
--- trunk/reactos/ntoskrnl/ob/ntobj.c (original)
+++ trunk/reactos/ntoskrnl/ob/ntobj.c Thu May 25 00:13:47 2006
@@ -35,7 +35,7 @@
ObpSetPermanentObject(IN PVOID ObjectBody,
IN BOOLEAN Permanent)
{
- PROS_OBJECT_HEADER ObjectHeader;
+ POBJECT_HEADER ObjectHeader;
OBP_LOOKUP_CONTEXT Context;
ObjectHeader = BODY_TO_HEADER(ObjectBody);
@@ -179,7 +179,7 @@
OUT PULONG ResultLength OPTIONAL)
{
OBJECT_HANDLE_INFORMATION HandleInfo;
- PROS_OBJECT_HEADER ObjectHeader;
+ POBJECT_HEADER ObjectHeader;
ULONG InfoLength;
PVOID Object;
NTSTATUS Status;
Modified: trunk/reactos/ntoskrnl/ob/object.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/ntoskrnl/ob/object.c?rev=22…
==============================================================================
--- trunk/reactos/ntoskrnl/ob/object.c (original)
+++ trunk/reactos/ntoskrnl/ob/object.c Thu May 25 00:13:47 2006
@@ -22,7 +22,7 @@
typedef struct _RETENTION_CHECK_PARAMS
{
WORK_QUEUE_ITEM WorkItem;
- PROS_OBJECT_HEADER ObjectHeader;
+ POBJECT_HEADER ObjectHeader;
} RETENTION_CHECK_PARAMS, *PRETENTION_CHECK_PARAMS;
/* FUNCTIONS ************************************************************/
@@ -299,7 +299,7 @@
PVOID NextObject;
PVOID CurrentObject;
PVOID RootObject;
- PROS_OBJECT_HEADER CurrentHeader;
+ POBJECT_HEADER CurrentHeader;
NTSTATUS Status;
PWSTR current;
UNICODE_STRING PathString;
@@ -443,7 +443,7 @@
OUT PULONG ReturnLength)
{
POBJECT_HEADER_NAME_INFO LocalInfo;
- PROS_OBJECT_HEADER ObjectHeader;
+ POBJECT_HEADER ObjectHeader;
POBJECT_DIRECTORY ParentDirectory;
ULONG NameSize;
PWCH ObjectName;
@@ -621,9 +621,9 @@
PUNICODE_STRING ObjectName,
POBJECT_TYPE ObjectType,
ULONG ObjectSize,
- PROS_OBJECT_HEADER *ObjectHeader)
-{
- PROS_OBJECT_HEADER Header;
+ POBJECT_HEADER *ObjectHeader)
+{
+ POBJECT_HEADER Header;
BOOLEAN HasHandleInfo = FALSE;
BOOLEAN HasNameInfo = FALSE;
BOOLEAN HasCreatorInfo = FALSE;
@@ -687,7 +687,7 @@
HandleInfo = (POBJECT_HEADER_HANDLE_INFO)Header;
DPRINT("Info: %x\n", HandleInfo);
HandleInfo->SingleEntry.HandleCount = 0;
- Header = (PROS_OBJECT_HEADER)(HandleInfo + 1);
+ Header = (POBJECT_HEADER)(HandleInfo + 1);
}
/* Initialize the Object Name Info */
@@ -697,7 +697,7 @@
DPRINT("Info: %x %wZ\n", NameInfo, ObjectName);
NameInfo->Name = *ObjectName;
NameInfo->Directory = NULL;
- Header = (PROS_OBJECT_HEADER)(NameInfo + 1);
+ Header = (POBJECT_HEADER)(NameInfo + 1);
}
/* Initialize Creator Info */
@@ -709,7 +709,7 @@
* CreatorInfo->CreatorUniqueProcess = PsGetCurrentProcessId();
*/
InitializeListHead(&CreatorInfo->TypeList);
- Header = (PROS_OBJECT_HEADER)(CreatorInfo + 1);
+ Header = (POBJECT_HEADER)(CreatorInfo + 1);
}
/* Initialize the object header */
@@ -780,7 +780,7 @@
NTSTATUS Status;
POBJECT_CREATE_INFORMATION ObjectCreateInfo;
UNICODE_STRING ObjectName;
- PROS_OBJECT_HEADER Header;
+ POBJECT_HEADER Header;
DPRINT("ObCreateObject(Type %p ObjectAttributes %p, Object %p)\n",
Type, ObjectAttributes, Object);
@@ -848,7 +848,7 @@
IN POBJECT_TYPE ObjectType,
IN KPROCESSOR_MODE AccessMode)
{
- PROS_OBJECT_HEADER Header;
+ POBJECT_HEADER Header;
/* NOTE: should be possible to reference an object above APC_LEVEL! */
@@ -941,7 +941,7 @@
static NTSTATUS
-ObpDeleteObject(PROS_OBJECT_HEADER Header)
+ObpDeleteObject(POBJECT_HEADER Header)
{
PVOID HeaderLocation = Header;
POBJECT_HEADER_HANDLE_INFO HandleInfo;
@@ -1018,7 +1018,7 @@
STATIC NTSTATUS
-ObpDeleteObjectDpcLevel(IN PROS_OBJECT_HEADER ObjectHeader,
+ObpDeleteObjectDpcLevel(IN POBJECT_HEADER ObjectHeader,
IN LONG OldPointerCount)
{
#if 0
@@ -1097,7 +1097,7 @@
VOID FASTCALL
ObfReferenceObject(IN PVOID Object)
{
- PROS_OBJECT_HEADER Header;
+ POBJECT_HEADER Header;
ASSERT(Object);
@@ -1130,7 +1130,7 @@
VOID FASTCALL
ObfDereferenceObject(IN PVOID Object)
{
- PROS_OBJECT_HEADER Header;
+ POBJECT_HEADER Header;
LONG NewPointerCount;
BOOL Permanent;
@@ -1225,7 +1225,7 @@
ULONG STDCALL
ObGetObjectPointerCount(PVOID Object)
{
- PROS_OBJECT_HEADER Header;
+ POBJECT_HEADER Header;
PAGED_CODE();
@@ -1253,7 +1253,7 @@
NTAPI
ObGetObjectHandleCount(PVOID Object)
{
- PROS_OBJECT_HEADER Header;
+ POBJECT_HEADER Header;
PAGED_CODE();
Modified: trunk/reactos/ntoskrnl/ob/security.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/ntoskrnl/ob/security.c?rev=…
==============================================================================
--- trunk/reactos/ntoskrnl/ob/security.c (original)
+++ trunk/reactos/ntoskrnl/ob/security.c Thu May 25 00:13:47 2006
@@ -100,7 +100,7 @@
OUT PSECURITY_DESCRIPTOR *SecurityDescriptor,
OUT PBOOLEAN MemoryAllocated)
{
- PROS_OBJECT_HEADER Header;
+ POBJECT_HEADER Header;
ULONG Length;
NTSTATUS Status;
PAGED_CODE();
@@ -230,7 +230,7 @@
{
KPROCESSOR_MODE PreviousMode = ExGetPreviousMode();
PVOID Object;
- PROS_OBJECT_HEADER Header;
+ POBJECT_HEADER Header;
ACCESS_MASK DesiredAccess = (ACCESS_MASK)0;
NTSTATUS Status = STATUS_SUCCESS;
PAGED_CODE();
@@ -328,7 +328,7 @@
{
KPROCESSOR_MODE PreviousMode = ExGetPreviousMode();
PVOID Object;
- PROS_OBJECT_HEADER Header;
+ POBJECT_HEADER Header;
SECURITY_DESCRIPTOR_RELATIVE *CapturedSecurityDescriptor;
ACCESS_MASK DesiredAccess = (ACCESS_MASK)0;
NTSTATUS Status;
Modified: trunk/reactos/ntoskrnl/ob/wait.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/ntoskrnl/ob/wait.c?rev=2201…
==============================================================================
--- trunk/reactos/ntoskrnl/ob/wait.c (original)
+++ trunk/reactos/ntoskrnl/ob/wait.c Thu May 25 00:13:47 2006
@@ -60,7 +60,7 @@
LARGE_INTEGER SafeTimeOut;
BOOLEAN LockInUse;
PHANDLE_TABLE_ENTRY HandleEntry;
- PROS_OBJECT_HEADER ObjectHeader;
+ POBJECT_HEADER ObjectHeader;
PHANDLE_TABLE HandleTable;
ACCESS_MASK GrantedAccess;
PVOID DefaultObject;
Modified: trunk/reactos/ntoskrnl/se/semgr.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/ntoskrnl/se/semgr.c?rev=220…
==============================================================================
--- trunk/reactos/ntoskrnl/se/semgr.c (original)
+++ trunk/reactos/ntoskrnl/se/semgr.c Thu May 25 00:13:47 2006
@@ -212,7 +212,7 @@
PISECURITY_DESCRIPTOR ObjectSd;
PISECURITY_DESCRIPTOR NewSd;
PISECURITY_DESCRIPTOR SecurityDescriptor = _SecurityDescriptor;
- PROS_OBJECT_HEADER Header = BODY_TO_HEADER(Object);
+ POBJECT_HEADER Header = BODY_TO_HEADER(Object);
PSID Owner = 0;
PSID Group = 0;
PACL Dacl = 0;