Author: fireball
Date: Wed Jun 18 07:28:29 2008
New Revision: 34009
URL:
http://svn.reactos.org/svn/reactos?rev=34009&view=rev
Log:
- Rename made-up Ob functions names to match publicly available NT names, as most of other
Ob names do.
Modified:
trunk/reactos/ntoskrnl/include/internal/io.h
trunk/reactos/ntoskrnl/include/internal/ob.h
trunk/reactos/ntoskrnl/include/internal/ob_x.h
trunk/reactos/ntoskrnl/ob/obdir.c
trunk/reactos/ntoskrnl/ob/obhandle.c
trunk/reactos/ntoskrnl/ob/obinit.c
trunk/reactos/ntoskrnl/ob/oblife.c
trunk/reactos/ntoskrnl/ob/obname.c
trunk/reactos/ntoskrnl/ob/obref.c
Modified: trunk/reactos/ntoskrnl/include/internal/io.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/io.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/include/internal/io.h [iso-8859-1] Wed Jun 18 07:28:29 2008
@@ -66,7 +66,7 @@
// We can call the Ob Inlined API, it's the same thing
//
#define IopAllocateMdlFromLookaside \
- ObpAllocateCapturedAttributes
+ ObpAllocateObjectCreateInfoBuffer
#define IopFreeMdlFromLookaside \
ObpFreeCapturedAttributes
Modified: trunk/reactos/ntoskrnl/include/internal/ob.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/ob.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/include/internal/ob.h [iso-8859-1] Wed Jun 18 07:28:29 2008
@@ -562,7 +562,7 @@
NTSTATUS
NTAPI
-ObpCaptureObjectAttributes(
+ObpCaptureObjectCreateInformation(
IN POBJECT_ATTRIBUTES ObjectAttributes,
IN KPROCESSOR_MODE AccessMode,
IN BOOLEAN AllocateFromLookaside,
Modified: trunk/reactos/ntoskrnl/include/internal/ob_x.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/ob_x.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/include/internal/ob_x.h [iso-8859-1] Wed Jun 18 07:28:29 2008
@@ -79,7 +79,7 @@
POBJECT_HEADER_NAME_INFO
FORCEINLINE
-ObpAcquireNameInformation(IN POBJECT_HEADER ObjectHeader)
+ObpReferenceNameInfo(IN POBJECT_HEADER ObjectHeader)
{
POBJECT_HEADER_NAME_INFO ObjectNameInfo;
ULONG NewValue, References;
@@ -120,7 +120,7 @@
VOID
FORCEINLINE
-ObpReleaseNameInformation(IN POBJECT_HEADER_NAME_INFO HeaderNameInfo)
+ObpDereferenceNameInfo(IN POBJECT_HEADER_NAME_INFO HeaderNameInfo)
{
POBJECT_DIRECTORY Directory;
@@ -198,7 +198,7 @@
VOID
FORCEINLINE
-ObpInitializeDirectoryLookup(IN POBP_LOOKUP_CONTEXT Context)
+ObpInitializeLookupContext(IN POBP_LOOKUP_CONTEXT Context)
{
/* Initialize a null context */
Context->Object = NULL;
@@ -222,7 +222,7 @@
HeaderNameInfo = OBJECT_HEADER_TO_NAME_INFO(ObjectHeader);
/* release the name information */
- ObpReleaseNameInformation(HeaderNameInfo);
+ ObpDereferenceNameInfo(HeaderNameInfo);
/* Dereference the object */
ObDereferenceObject(Context->Object);
@@ -232,7 +232,7 @@
VOID
FORCEINLINE
-ObpCleanupDirectoryLookup(IN POBP_LOOKUP_CONTEXT Context)
+ObpReleaseLookupContext(IN POBP_LOOKUP_CONTEXT Context)
{
/* Check if we came back with the directory locked */
if (Context->DirectoryLocked)
@@ -273,7 +273,7 @@
VOID
FORCEINLINE
-ObpReleaseCapturedAttributes(IN POBJECT_CREATE_INFORMATION ObjectCreateInfo)
+ObpReleaseObjectCreateInformation(IN POBJECT_CREATE_INFORMATION ObjectCreateInfo)
{
/* Check if we have a security descriptor */
if (ObjectCreateInfo->SecurityDescriptor)
@@ -288,7 +288,7 @@
PVOID
FORCEINLINE
-ObpAllocateCapturedAttributes(IN PP_NPAGED_LOOKASIDE_NUMBER Type)
+ObpAllocateObjectCreateInfoBuffer(IN PP_NPAGED_LOOKASIDE_NUMBER Type)
{
PVOID Buffer;
PNPAGED_LOOKASIDE_LIST List;
@@ -369,10 +369,10 @@
VOID
FORCEINLINE
-ObpFreeAndReleaseCapturedAttributes(IN POBJECT_CREATE_INFORMATION ObjectCreateInfo)
+ObpFreeObjectCreateInformation(IN POBJECT_CREATE_INFORMATION ObjectCreateInfo)
{
/* First release the attributes, then free them from the lookaside list */
- ObpReleaseCapturedAttributes(ObjectCreateInfo);
+ ObpReleaseObjectCreateInformation(ObjectCreateInfo);
ObpFreeCapturedAttributes(ObjectCreateInfo, LookasideCreateInfoList);
}
Modified: trunk/reactos/ntoskrnl/ob/obdir.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ob/obdir.c?rev=34…
==============================================================================
--- trunk/reactos/ntoskrnl/ob/obdir.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ob/obdir.c [iso-8859-1] Wed Jun 18 07:28:29 2008
@@ -262,7 +262,7 @@
{
/* Get the object name information */
ObjectHeader = OBJECT_TO_OBJECT_HEADER(FoundObject);
- ObpAcquireNameInformation(ObjectHeader);
+ ObpReferenceNameInfo(ObjectHeader);
/* Reference the object being looked up */
ObReferenceObject(FoundObject);
@@ -281,7 +281,7 @@
/* We already did a lookup, so remove this object's query reference */
ObjectHeader = OBJECT_TO_OBJECT_HEADER(Context->Object);
HeaderNameInfo = OBJECT_HEADER_TO_NAME_INFO(ObjectHeader);
- ObpReleaseNameInformation(HeaderNameInfo);
+ ObpDereferenceNameInfo(HeaderNameInfo);
/* Also dereference the object itself */
ObDereferenceObject(Context->Object);
@@ -480,7 +480,7 @@
PAGED_CODE();
/* Initialize lookup */
- ObpInitializeDirectoryLookup(&LookupContext);
+ ObpInitializeLookupContext(&LookupContext);
/* Check if we need to do any probing */
if (PreviousMode != KernelMode)
Modified: trunk/reactos/ntoskrnl/ob/obhandle.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ob/obhandle.c?rev…
==============================================================================
--- trunk/reactos/ntoskrnl/ob/obhandle.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ob/obhandle.c [iso-8859-1] Wed Jun 18 07:28:29 2008
@@ -1467,7 +1467,7 @@
if ((Type) && (ObjectType != Type))
{
/* They don't, cleanup */
- if (Context) ObpCleanupDirectoryLookup(Context);
+ if (Context) ObpReleaseLookupContext(Context);
return STATUS_OBJECT_TYPE_MISMATCH;
}
@@ -1508,7 +1508,7 @@
* We failed (meaning security failure, according to NT Internals)
* detach and return
*/
- if (Context) ObpCleanupDirectoryLookup(Context);
+ if (Context) ObpReleaseLookupContext(Context);
if (AttachedToProcess) KeUnstackDetachProcess(&ApcState);
return Status;
}
@@ -1545,7 +1545,7 @@
}
/* Now we can release the object */
- if (Context) ObpCleanupDirectoryLookup(Context);
+ if (Context) ObpReleaseLookupContext(Context);
/* Save the access mask */
NewEntry.GrantedAccess = GrantedAccess;
@@ -2417,11 +2417,11 @@
if (!TempBuffer) return STATUS_INSUFFICIENT_RESOURCES;
/* Capture all the info */
- Status = ObpCaptureObjectAttributes(ObjectAttributes,
- AccessMode,
- TRUE,
- &TempBuffer->ObjectCreateInfo,
- &ObjectName);
+ Status = ObpCaptureObjectCreateInformation(ObjectAttributes,
+ AccessMode,
+ TRUE,
+ &TempBuffer->ObjectCreateInfo,
+ &ObjectName);
if (!NT_SUCCESS(Status))
{
/* Fail */
@@ -2467,7 +2467,7 @@
if (!NT_SUCCESS(Status))
{
/* Cleanup after lookup */
- ObpCleanupDirectoryLookup(&TempBuffer->LookupContext);
+ ObpReleaseLookupContext(&TempBuffer->LookupContext);
goto Cleanup;
}
@@ -2482,7 +2482,7 @@
if (ObjectHeader->ObjectCreateInfo)
{
/* Free it */
- ObpFreeAndReleaseCapturedAttributes(ObjectHeader->
+ ObpFreeObjectCreateInformation(ObjectHeader->
ObjectCreateInfo);
ObjectHeader->ObjectCreateInfo = NULL;
}
@@ -2501,7 +2501,7 @@
Status = STATUS_INVALID_PARAMETER;
/* Cleanup after lookup */
- ObpCleanupDirectoryLookup(&TempBuffer->LookupContext);
+ ObpReleaseLookupContext(&TempBuffer->LookupContext);
/* Dereference the object */
ObDereferenceObject(Object);
@@ -2531,7 +2531,7 @@
Quickie:
/* Release the object attributes and temporary buffer */
- ObpReleaseCapturedAttributes(&TempBuffer->ObjectCreateInfo);
+ ObpReleaseObjectCreateInformation(&TempBuffer->ObjectCreateInfo);
if (ObjectName.Buffer) ObpFreeObjectNameBuffer(&ObjectName);
ExFreePool(TempBuffer);
@@ -2813,7 +2813,7 @@
/* Get the create and name info, as well as the object type */
ObjectCreateInfo = ObjectHeader->ObjectCreateInfo;
- ObjectNameInfo = ObpAcquireNameInformation(ObjectHeader);
+ ObjectNameInfo = ObpReferenceNameInfo(ObjectHeader);
ObjectType = ObjectHeader->Type;
ObjectName = NULL;
@@ -2849,10 +2849,10 @@
Handle);
/* Free the create information */
- ObpFreeAndReleaseCapturedAttributes(ObjectCreateInfo);
+ ObpFreeObjectCreateInformation(ObjectCreateInfo);
/* Release the object name information */
- ObpReleaseNameInformation(ObjectNameInfo);
+ ObpDereferenceNameInfo(ObjectNameInfo);
/* Remove the extra keep-alive reference */
ObDereferenceObject(Object);
@@ -2878,7 +2878,7 @@
if (!NT_SUCCESS(Status))
{
/* Fail */
- ObpReleaseNameInformation(ObjectNameInfo);
+ ObpDereferenceNameInfo(ObjectNameInfo);
ObDereferenceObject(Object);
return Status;
}
@@ -2892,13 +2892,13 @@
if (!NT_SUCCESS(Status))
{
/* Fail */
- ObpReleaseNameInformation(ObjectNameInfo);
+ ObpDereferenceNameInfo(ObjectNameInfo);
ObDereferenceObject(Object);
return Status;
}
/* Setup a lookup context */
- ObpInitializeDirectoryLookup(&Context);
+ ObpInitializeLookupContext(&Context);
InsertObject = Object;
OpenReason = ObCreateHandle;
@@ -2959,10 +2959,10 @@
if (!NT_SUCCESS(Status))
{
/* Cleanup after lookup */
- ObpCleanupDirectoryLookup(&Context);
+ ObpReleaseLookupContext(&Context);
/* Remove query reference that we added */
- ObpReleaseNameInformation(ObjectNameInfo);
+ ObpDereferenceNameInfo(ObjectNameInfo);
/* Dereference the object and delete the access state */
ObDereferenceObject(Object);
@@ -3038,10 +3038,10 @@
}
/* Cleanup the lookup */
- ObpCleanupDirectoryLookup(&Context);
+ ObpReleaseLookupContext(&Context);
/* Remove query reference that we added */
- ObpReleaseNameInformation(ObjectNameInfo);
+ ObpDereferenceNameInfo(ObjectNameInfo);
/* Dereference the object and delete the access state */
ObDereferenceObject(Object);
@@ -3086,7 +3086,7 @@
}
/* Remove a query reference */
- ObpReleaseNameInformation(ObjectNameInfo);
+ ObpDereferenceNameInfo(ObjectNameInfo);
/* Remove the extra keep-alive reference */
ObDereferenceObject(Object);
@@ -3109,7 +3109,7 @@
}
/* We can delete the Create Info now */
- ObpFreeAndReleaseCapturedAttributes(ObjectCreateInfo);
+ ObpFreeObjectCreateInformation(ObjectCreateInfo);
/* Check if we created our own access state and delete it if so */
if (AccessState == &LocalAccessState) SeDeleteAccessState(AccessState);
Modified: trunk/reactos/ntoskrnl/ob/obinit.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ob/obinit.c?rev=3…
==============================================================================
--- trunk/reactos/ntoskrnl/ob/obinit.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ob/obinit.c [iso-8859-1] Wed Jun 18 07:28:29 2008
@@ -298,7 +298,7 @@
if (!NT_SUCCESS(Status)) return FALSE;
/* Initialize lookup context */
- ObpInitializeDirectoryLookup(&Context);
+ ObpInitializeLookupContext(&Context);
/* Lock it */
ObpAcquireDirectoryLockExclusive(ObpTypeDirectoryObject, &Context);
@@ -339,7 +339,7 @@
}
/* Cleanup after lookup */
- ObpCleanupDirectoryLookup(&Context);
+ ObpReleaseLookupContext(&Context);
/* Initialize DOS Devices Directory and related Symbolic Links */
Status = ObpCreateDosDevicesDirectory();
Modified: trunk/reactos/ntoskrnl/ob/oblife.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ob/oblife.c?rev=3…
==============================================================================
--- trunk/reactos/ntoskrnl/ob/oblife.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ob/oblife.c [iso-8859-1] Wed Jun 18 07:28:29 2008
@@ -80,7 +80,7 @@
if (Header->ObjectCreateInfo)
{
/* Free it */
- ObpFreeAndReleaseCapturedAttributes(Header->ObjectCreateInfo);
+ ObpFreeObjectCreateInformation(Header->ObjectCreateInfo);
Header->ObjectCreateInfo = NULL;
}
}
@@ -311,7 +311,7 @@
{
/* Allocate from the lookaside */
//MaximumLength = 248; <= hack, we should actually set this...!
- Buffer = ObpAllocateCapturedAttributes(LookasideNameBufferList);
+ Buffer = ObpAllocateObjectCreateInfoBuffer(LookasideNameBufferList);
}
/* Setup the string */
@@ -418,7 +418,7 @@
NTSTATUS
NTAPI
-ObpCaptureObjectAttributes(IN POBJECT_ATTRIBUTES ObjectAttributes,
+ObpCaptureObjectCreateInformation(IN POBJECT_ATTRIBUTES ObjectAttributes,
IN KPROCESSOR_MODE AccessMode,
IN BOOLEAN AllocateFromLookaside,
IN POBJECT_CREATE_INFORMATION ObjectCreateInfo,
@@ -541,7 +541,7 @@
}
/* Cleanup if we failed */
- if (!NT_SUCCESS(Status)) ObpReleaseCapturedAttributes(ObjectCreateInfo);
+ if (!NT_SUCCESS(Status)) ObpFreeObjectCreateInformation(ObjectCreateInfo);
/* Return status to caller */
return Status;
@@ -916,15 +916,15 @@
POBJECT_HEADER Header;
/* Allocate a capture buffer */
- ObjectCreateInfo = ObpAllocateCapturedAttributes(LookasideCreateInfoList);
+ ObjectCreateInfo = ObpAllocateObjectCreateInfoBuffer(LookasideCreateInfoList);
if (!ObjectCreateInfo) return STATUS_INSUFFICIENT_RESOURCES;
/* Capture all the info */
- Status = ObpCaptureObjectAttributes(ObjectAttributes,
- ProbeMode,
- FALSE,
- ObjectCreateInfo,
- &ObjectName);
+ Status = ObpCaptureObjectCreateInformation(ObjectAttributes,
+ ProbeMode,
+ FALSE,
+ ObjectCreateInfo,
+ &ObjectName);
if (NT_SUCCESS(Status))
{
/* Validate attributes */
@@ -984,7 +984,7 @@
}
/* Release the Capture Info, we don't need it */
- ObpReleaseCapturedAttributes(ObjectCreateInfo);
+ ObpFreeObjectCreateInformation(ObjectCreateInfo);
if (ObjectName.Buffer) ObpFreeObjectNameBuffer(&ObjectName);
}
@@ -1038,7 +1038,7 @@
}
/* Setup a lookup context */
- ObpInitializeDirectoryLookup(&Context);
+ ObpInitializeLookupContext(&Context);
/* Check if we've already created the directory of types */
if (ObpTypeDirectoryObject)
@@ -1054,7 +1054,7 @@
&Context))
{
/* We have already created it, so fail */
- ObpCleanupDirectoryLookup(&Context);
+ ObpReleaseLookupContext(&Context);
return STATUS_OBJECT_NAME_COLLISION;
}
}
@@ -1066,7 +1066,7 @@
if (!ObjectName.Buffer)
{
/* Out of memory, fail */
- ObpCleanupDirectoryLookup(&Context);
+ ObpReleaseLookupContext(&Context);
return STATUS_INSUFFICIENT_RESOURCES;
}
@@ -1084,7 +1084,7 @@
if (!NT_SUCCESS(Status))
{
/* Free the name and fail */
- ObpCleanupDirectoryLookup(&Context);
+ ObpReleaseLookupContext(&Context);
ExFreePool(ObjectName.Buffer);
return Status;
}
@@ -1224,7 +1224,7 @@
}
/* Cleanup the lookup context */
- ObpCleanupDirectoryLookup(&Context);
+ ObpReleaseLookupContext(&Context);
/* Return the object type and success */
*ObjectType = LocalObjectType;
@@ -1232,7 +1232,7 @@
}
/* If we got here, then we failed */
- ObpCleanupDirectoryLookup(&Context);
+ ObpReleaseLookupContext(&Context);
return STATUS_INSUFFICIENT_RESOURCES;
}
Modified: trunk/reactos/ntoskrnl/ob/obname.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ob/obname.c?rev=3…
==============================================================================
--- trunk/reactos/ntoskrnl/ob/obname.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ob/obname.c [iso-8859-1] Wed Jun 18 07:28:29 2008
@@ -179,7 +179,7 @@
/* Get object structures */
ObjectHeader = OBJECT_TO_OBJECT_HEADER(Object);
- ObjectNameInfo = ObpAcquireNameInformation(ObjectHeader);
+ ObjectNameInfo = ObpReferenceNameInfo(ObjectHeader);
ObjectType = ObjectHeader->Type;
/*
@@ -193,7 +193,7 @@
!(ObjectHeader->Flags & OB_FLAG_PERMANENT))
{
/* Setup a lookup context */
- ObpInitializeDirectoryLookup(&Context);
+ ObpInitializeLookupContext(&Context);
/* Lock the directory */
ObpAcquireDirectoryLockExclusive(ObjectNameInfo->Directory, &Context);
@@ -242,16 +242,16 @@
}
/* Cleanup after lookup */
- ObpCleanupDirectoryLookup(&Context);
+ ObpReleaseLookupContext(&Context);
/* Remove another query reference since we added one on top */
- ObpReleaseNameInformation(ObjectNameInfo);
+ ObpDereferenceNameInfo(ObjectNameInfo);
/* Check if we were inserted in a directory */
if (Directory)
{
/* We were, so first remove the extra reference we had added */
- ObpReleaseNameInformation(ObjectNameInfo);
+ ObpDereferenceNameInfo(ObjectNameInfo);
/* Now dereference the object as well */
ObDereferenceObject(Object);
@@ -260,7 +260,7 @@
else
{
/* Remove the reference we added */
- ObpReleaseNameInformation(ObjectNameInfo);
+ ObpDereferenceNameInfo(ObjectNameInfo);
}
}
@@ -300,7 +300,7 @@
InsertObject);
/* Initialize starting state */
- ObpInitializeDirectoryLookup(LookupContext);
+ ObpInitializeLookupContext(LookupContext);
*FoundObject = NULL;
Status = STATUS_SUCCESS;
Object = NULL;
@@ -755,7 +755,7 @@
InterlockedExchangeAdd(&ObjectHeader->PointerCount, 1);
/* Cleanup from the first lookup */
- ObpCleanupDirectoryLookup(LookupContext);
+ ObpReleaseLookupContext(LookupContext);
/* Check if we have a referenced directory */
if (ReferencedDirectory)
@@ -931,7 +931,7 @@
if (!NT_SUCCESS(Status))
{
/* Cleanup after lookup */
- ObpCleanupDirectoryLookup(LookupContext);
+ ObpReleaseLookupContext(LookupContext);
}
/* Check if we have a device map and dereference it if so */
Modified: trunk/reactos/ntoskrnl/ob/obref.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ob/obref.c?rev=34…
==============================================================================
--- trunk/reactos/ntoskrnl/ob/obref.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ob/obref.c [iso-8859-1] Wed Jun 18 07:28:29 2008
@@ -429,7 +429,7 @@
&Object);
/* Cleanup after lookup */
- ObpCleanupDirectoryLookup(&Context);
+ ObpReleaseLookupContext(&Context);
/* Check if the lookup succeeded */
if (NT_SUCCESS(Status))