Create type objects for all object types.

svn path=/trunk/; revision=6262
This commit is contained in:
Eric Kohl 2003-10-07 14:08:43 +00:00
parent 568dabc967
commit 908cf73ea4
15 changed files with 58 additions and 13 deletions

View file

@ -1,4 +1,4 @@
/* $Id: registry.c,v 1.108 2003/09/25 20:03:11 ekohl Exp $ /* $Id: registry.c,v 1.109 2003/10/07 14:08:43 ekohl Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -279,6 +279,8 @@ CmInitializeRegistry(VOID)
CmiKeyType->DuplicationNotify = NULL; CmiKeyType->DuplicationNotify = NULL;
RtlInitUnicodeString(&CmiKeyType->TypeName, L"Key"); RtlInitUnicodeString(&CmiKeyType->TypeName, L"Key");
ObpCreateTypeObject (CmiKeyType);
/* Initialize the hive list */ /* Initialize the hive list */
InitializeListHead(&CmiHiveListHead); InitializeListHead(&CmiHiveListHead);
ExInitializeResourceLite(&CmiHiveListLock); ExInitializeResourceLite(&CmiHiveListLock);

View file

@ -27,6 +27,7 @@
#include <limits.h> #include <limits.h>
#include <ddk/ntddk.h> #include <ddk/ntddk.h>
#include <internal/ex.h> #include <internal/ex.h>
#include <internal/ob.h>
#include <wchar.h> #include <wchar.h>
#define NDEBUG #define NDEBUG
@ -288,6 +289,8 @@ ExpWin32kInit(VOID)
ExWindowStationObjectType->DuplicationNotify = NULL; ExWindowStationObjectType->DuplicationNotify = NULL;
RtlInitUnicodeStringFromLiteral(&ExWindowStationObjectType->TypeName, L"WindowStation"); RtlInitUnicodeStringFromLiteral(&ExWindowStationObjectType->TypeName, L"WindowStation");
ObpCreateTypeObject(ExWindowStationObjectType);
/* Create desktop object type */ /* Create desktop object type */
ExDesktopObjectType = ExAllocatePool(NonPagedPool, sizeof(OBJECT_TYPE)); ExDesktopObjectType = ExAllocatePool(NonPagedPool, sizeof(OBJECT_TYPE));
if (ExDesktopObjectType == NULL) if (ExDesktopObjectType == NULL)
@ -315,6 +318,8 @@ ExpWin32kInit(VOID)
ExDesktopObjectType->Create = ExpDesktopObjectCreate; ExDesktopObjectType->Create = ExpDesktopObjectCreate;
ExDesktopObjectType->DuplicationNotify = NULL; ExDesktopObjectType->DuplicationNotify = NULL;
RtlInitUnicodeStringFromLiteral(&ExDesktopObjectType->TypeName, L"Desktop"); RtlInitUnicodeStringFromLiteral(&ExDesktopObjectType->TypeName, L"Desktop");
ObpCreateTypeObject(ExDesktopObjectType);
} }
/* EOF */ /* EOF */

View file

@ -1,4 +1,4 @@
/* $Id: driver.c,v 1.21 2003/10/06 18:49:50 navaraf Exp $ /* $Id: driver.c,v 1.22 2003/10/07 13:58:53 ekohl Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -109,6 +109,8 @@ IopInitDriverImplementation(VOID)
IoDriverObjectType->Create = IopCreateDriver; IoDriverObjectType->Create = IopCreateDriver;
IoDriverObjectType->DuplicationNotify = NULL; IoDriverObjectType->DuplicationNotify = NULL;
RtlInitUnicodeStringFromLiteral(&IoDriverObjectType->TypeName, L"Driver"); RtlInitUnicodeStringFromLiteral(&IoDriverObjectType->TypeName, L"Driver");
ObpCreateTypeObject(IoDriverObjectType);
} }
/********************************************************************** /**********************************************************************

View file

@ -1,4 +1,4 @@
/* $Id: iomgr.c,v 1.38 2003/09/29 20:43:07 navaraf Exp $ /* $Id: iomgr.c,v 1.39 2003/10/07 13:58:53 ekohl Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -234,6 +234,8 @@ VOID IoInit (VOID)
RtlInitUnicodeStringFromLiteral(&IoDeviceObjectType->TypeName, L"Device"); RtlInitUnicodeStringFromLiteral(&IoDeviceObjectType->TypeName, L"Device");
ObpCreateTypeObject(IoDeviceObjectType);
/* /*
* Register iomgr types: FileObjectType * Register iomgr types: FileObjectType
* (alias DriverObjectType) * (alias DriverObjectType)
@ -261,6 +263,8 @@ VOID IoInit (VOID)
RtlInitUnicodeStringFromLiteral(&IoFileObjectType->TypeName, L"File"); RtlInitUnicodeStringFromLiteral(&IoFileObjectType->TypeName, L"File");
ObpCreateTypeObject(IoFileObjectType);
/* /*
* Create the '\Driver' object directory * Create the '\Driver' object directory
*/ */

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id: section.c,v 1.128 2003/09/25 20:05:44 ekohl Exp $ /* $Id: section.c,v 1.129 2003/10/07 14:00:10 ekohl Exp $
* *
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
* FILE: ntoskrnl/mm/section.c * FILE: ntoskrnl/mm/section.c
@ -2164,6 +2164,12 @@ MmInitSectionImplementation(VOID)
MmSectionObjectType->Create = MmpCreateSection; MmSectionObjectType->Create = MmpCreateSection;
MmSectionObjectType->DuplicationNotify = NULL; MmSectionObjectType->DuplicationNotify = NULL;
/*
* NOTE: Do not register the section object type here because
* the object manager it not initialized yet!
* The section object type will be created in ObInit().
*/
return(STATUS_SUCCESS); return(STATUS_SUCCESS);
} }

View file

@ -1,4 +1,4 @@
/* $Id: evtpair.c,v 1.17 2003/09/25 20:06:32 ekohl Exp $ /* $Id: evtpair.c,v 1.18 2003/10/07 14:00:45 ekohl Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -18,6 +18,7 @@
#define NTOS_MODE_KERNEL #define NTOS_MODE_KERNEL
#include <ntos.h> #include <ntos.h>
#include <ntos/synch.h> #include <ntos/synch.h>
#include <internal/ob.h>
#include <internal/ps.h> #include <internal/ps.h>
#include <limits.h> #include <limits.h>
@ -89,6 +90,7 @@ VOID NtInitializeEventPairImplementation(VOID)
ExEventPairObjectType->DuplicationNotify = NULL; ExEventPairObjectType->DuplicationNotify = NULL;
KeInitializeSpinLock(&ExThreadEventPairSpinLock); KeInitializeSpinLock(&ExThreadEventPairSpinLock);
ObpCreateTypeObject(ExEventPairObjectType);
} }

View file

@ -32,6 +32,7 @@
#define NTOS_MODE_KERNEL #define NTOS_MODE_KERNEL
#include <ntos.h> #include <ntos.h>
#include <ntos/synch.h> #include <ntos/synch.h>
#include <internal/ob.h>
#define NDEBUG #define NDEBUG
#include <internal/debug.h> #include <internal/debug.h>
@ -102,6 +103,8 @@ NtInitializeMutantImplementation(VOID)
ExMutantObjectType->OkayToClose = NULL; ExMutantObjectType->OkayToClose = NULL;
ExMutantObjectType->Create = NtpCreateMutant; ExMutantObjectType->Create = NtpCreateMutant;
ExMutantObjectType->DuplicationNotify = NULL; ExMutantObjectType->DuplicationNotify = NULL;
ObpCreateTypeObject(ExMutantObjectType);
} }

View file

@ -31,6 +31,7 @@
#define NTOS_MODE_KERNEL #define NTOS_MODE_KERNEL
#include <ntos.h> #include <ntos.h>
#include <internal/id.h> #include <internal/id.h>
#include <internal/ob.h>
#include <ntos/synch.h> #include <ntos/synch.h>
#include <internal/pool.h> #include <internal/pool.h>
#include <internal/safe.h> #include <internal/safe.h>
@ -94,6 +95,8 @@ NtInitializeEventImplementation(VOID)
ExEventObjectType->OkayToClose = NULL; ExEventObjectType->OkayToClose = NULL;
ExEventObjectType->Create = NtpCreateEvent; ExEventObjectType->Create = NtpCreateEvent;
ExEventObjectType->DuplicationNotify = NULL; ExEventObjectType->DuplicationNotify = NULL;
ObpCreateTypeObject(ExEventObjectType);
} }

View file

@ -1,4 +1,4 @@
/* $Id: ntsem.c,v 1.19 2003/09/25 20:06:32 ekohl Exp $ /* $Id: ntsem.c,v 1.20 2003/10/07 14:00:45 ekohl Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -15,6 +15,7 @@
#define NTOS_MODE_KERNEL #define NTOS_MODE_KERNEL
#include <ntos.h> #include <ntos.h>
#include <ntos/synch.h> #include <ntos/synch.h>
#include <internal/ob.h>
#include <internal/pool.h> #include <internal/pool.h>
#include <internal/ps.h> #include <internal/ps.h>
@ -74,6 +75,8 @@ VOID NtInitializeSemaphoreImplementation(VOID)
ExSemaphoreType->OkayToClose = NULL; ExSemaphoreType->OkayToClose = NULL;
ExSemaphoreType->Create = NtpCreateSemaphore; ExSemaphoreType->Create = NtpCreateSemaphore;
ExSemaphoreType->DuplicationNotify = NULL; ExSemaphoreType->DuplicationNotify = NULL;
ObpCreateTypeObject(ExSemaphoreType);
} }
NTSTATUS STDCALL NTSTATUS STDCALL

View file

@ -1,4 +1,4 @@
/* $Id: nttimer.c,v 1.20 2003/09/25 20:06:32 ekohl Exp $ /* $Id: nttimer.c,v 1.21 2003/10/07 14:00:45 ekohl Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -15,6 +15,7 @@
#include <ntos.h> #include <ntos.h>
#include <ntos/synch.h> #include <ntos/synch.h>
#include <internal/ke.h> #include <internal/ke.h>
#include <internal/ob.h>
#include <limits.h> #include <limits.h>
#include <internal/pool.h> #include <internal/pool.h>
#include <internal/safe.h> #include <internal/safe.h>
@ -141,6 +142,8 @@ VOID NtInitializeTimerImplementation(VOID)
ExTimerType->OkayToClose = NULL; ExTimerType->OkayToClose = NULL;
ExTimerType->Create = NtpCreateTimer; ExTimerType->Create = NtpCreateTimer;
ExTimerType->DuplicationNotify = NULL; ExTimerType->DuplicationNotify = NULL;
ObpCreateTypeObject(ExTimerType);
} }

View file

@ -30,6 +30,7 @@
#define NTOS_MODE_KERNEL #define NTOS_MODE_KERNEL
#include <ntos.h> #include <ntos.h>
#include <internal/mm.h> #include <internal/mm.h>
#include <internal/ob.h>
#include <internal/ps.h> #include <internal/ps.h>
#include <internal/pool.h> #include <internal/pool.h>
#include <limits.h> #include <limits.h>
@ -394,6 +395,8 @@ NtInitializeProfileImplementation(VOID)
ExProfileObjectType->QueryName = NULL; ExProfileObjectType->QueryName = NULL;
ExProfileObjectType->OkayToClose = NULL; ExProfileObjectType->OkayToClose = NULL;
ExProfileObjectType->Create = NULL; ExProfileObjectType->Create = NULL;
ObpCreateTypeObject(ExProfileObjectType);
} }
NTSTATUS STDCALL NTSTATUS STDCALL

View file

@ -1,4 +1,4 @@
/* $Id: namespc.c,v 1.40 2003/09/25 20:07:46 ekohl Exp $ /* $Id: namespc.c,v 1.41 2003/10/07 14:01:15 ekohl Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -432,6 +432,9 @@ ObInit(VOID)
/* Create 'symbolic link' object type */ /* Create 'symbolic link' object type */
ObInitSymbolicLinkImplementation(); ObInitSymbolicLinkImplementation();
/* Create 'section' object type */
ObpCreateTypeObject(MmSectionObjectType);
} }

View file

@ -1,4 +1,4 @@
/* $Id: process.c,v 1.117 2003/10/04 18:19:17 navaraf Exp $ /* $Id: process.c,v 1.118 2003/10/07 14:01:57 ekohl Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -263,6 +263,8 @@ PsInitProcessManagment(VOID)
RtlInitUnicodeStringFromLiteral(&PsProcessType->TypeName, L"Process"); RtlInitUnicodeStringFromLiteral(&PsProcessType->TypeName, L"Process");
ObpCreateTypeObject(PsProcessType);
InitializeListHead(&PsProcessListHead); InitializeListHead(&PsProcessListHead);
KeInitializeSpinLock(&PsProcessListLock); KeInitializeSpinLock(&PsProcessListLock);

View file

@ -1,4 +1,4 @@
/* $Id: thread.c,v 1.118 2003/09/30 22:36:29 gvg Exp $ /* $Id: thread.c,v 1.119 2003/10/07 14:01:57 ekohl Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -462,8 +462,6 @@ PsInitThreadManagment(VOID)
PsThreadType = ExAllocatePool(NonPagedPool,sizeof(OBJECT_TYPE)); PsThreadType = ExAllocatePool(NonPagedPool,sizeof(OBJECT_TYPE));
RtlInitUnicodeStringFromLiteral(&PsThreadType->TypeName, L"Thread");
PsThreadType->Tag = TAG('T', 'H', 'R', 'T'); PsThreadType->Tag = TAG('T', 'H', 'R', 'T');
PsThreadType->TotalObjects = 0; PsThreadType->TotalObjects = 0;
PsThreadType->TotalHandles = 0; PsThreadType->TotalHandles = 0;
@ -483,6 +481,10 @@ PsInitThreadManagment(VOID)
PsThreadType->Create = NULL; PsThreadType->Create = NULL;
PsThreadType->DuplicationNotify = NULL; PsThreadType->DuplicationNotify = NULL;
RtlInitUnicodeStringFromLiteral(&PsThreadType->TypeName, L"Thread");
ObpCreateTypeObject(PsThreadType);
PsInitializeThread(NULL,&FirstThread,&FirstThreadHandle, PsInitializeThread(NULL,&FirstThread,&FirstThreadHandle,
THREAD_ALL_ACCESS,NULL, TRUE); THREAD_ALL_ACCESS,NULL, TRUE);
FirstThread->Tcb.State = THREAD_STATE_RUNNING; FirstThread->Tcb.State = THREAD_STATE_RUNNING;

View file

@ -1,4 +1,4 @@
/* $Id: token.c,v 1.27 2003/09/25 20:09:11 ekohl Exp $ /* $Id: token.c,v 1.28 2003/10/07 14:04:52 ekohl Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -14,6 +14,7 @@
#include <limits.h> #include <limits.h>
#define NTOS_MODE_KERNEL #define NTOS_MODE_KERNEL
#include <ntos.h> #include <ntos.h>
#include <internal/ob.h>
#include <internal/ps.h> #include <internal/ps.h>
#include <internal/se.h> #include <internal/se.h>
#include <internal/safe.h> #include <internal/safe.h>
@ -480,6 +481,7 @@ SepInitializeTokenImplementation(VOID)
RtlCreateUnicodeString(&SepTokenObjectType->TypeName, RtlCreateUnicodeString(&SepTokenObjectType->TypeName,
L"Token"); L"Token");
ObpCreateTypeObject (SepTokenObjectType);
} }