ntoskrnl.exe: Implement process object constructor.
Signed-off-by: Derek Lesho <dereklesho52@Gmail.com> Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
f534fbd3e3
commit
e5bbb5e6ca
|
@ -2451,11 +2451,23 @@ NTSTATUS WINAPI FsRtlRegisterUncProvider(PHANDLE MupHandle, PUNICODE_STRING Redi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void *create_process_object( HANDLE handle )
|
||||||
|
{
|
||||||
|
PEPROCESS process;
|
||||||
|
|
||||||
|
if (!(process = alloc_kernel_object( PsProcessType, handle, sizeof(*process), 0 ))) return NULL;
|
||||||
|
|
||||||
|
process->header.Type = 3;
|
||||||
|
process->header.WaitListHead.Blink = INVALID_HANDLE_VALUE; /* mark as kernel object */
|
||||||
|
return process;
|
||||||
|
}
|
||||||
|
|
||||||
static const WCHAR process_type_name[] = {'P','r','o','c','e','s','s',0};
|
static const WCHAR process_type_name[] = {'P','r','o','c','e','s','s',0};
|
||||||
|
|
||||||
static struct _OBJECT_TYPE process_type =
|
static struct _OBJECT_TYPE process_type =
|
||||||
{
|
{
|
||||||
process_type_name
|
process_type_name,
|
||||||
|
create_process_object
|
||||||
};
|
};
|
||||||
|
|
||||||
POBJECT_TYPE PsProcessType = &process_type;
|
POBJECT_TYPE PsProcessType = &process_type;
|
||||||
|
|
|
@ -28,6 +28,10 @@ struct _OBJECT_TYPE
|
||||||
void (*release)(void*); /* called when the last reference is released */
|
void (*release)(void*); /* called when the last reference is released */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct _EPROCESS {
|
||||||
|
DISPATCHER_HEADER header;
|
||||||
|
};
|
||||||
|
|
||||||
struct _KTHREAD
|
struct _KTHREAD
|
||||||
{
|
{
|
||||||
DISPATCHER_HEADER header;
|
DISPATCHER_HEADER header;
|
||||||
|
|
Loading…
Reference in New Issue