maintainers: Update the Direct3D section.
[wine.git] / dlls / ntoskrnl.exe / ntoskrnl_private.h
blobc736a9805a09226ec558a8d61f680adf18e75dc6
1 /*
2 * ntoskrnl.exe implementation
4 * Copyright (C) 2007 Alexandre Julliard
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #ifndef __WINE_NTOSKRNL_PRIVATE_H
22 #define __WINE_NTOSKRNL_PRIVATE_H
24 #include <stdarg.h>
25 #include "ntstatus.h"
26 #define WIN32_NO_STATUS
27 #include "windef.h"
28 #include "winioctl.h"
29 #include "winbase.h"
30 #include "winsvc.h"
31 #include "winternl.h"
32 #include "ddk/ntifs.h"
33 #include "ddk/wdm.h"
35 #include "wine/asm.h"
36 #include "wine/debug.h"
37 #include "wine/list.h"
38 #include "wine/rbtree.h"
40 static inline LPCSTR debugstr_us( const UNICODE_STRING *us )
42 if (!us) return "<null>";
43 return debugstr_wn( us->Buffer, us->Length / sizeof(WCHAR) );
46 struct _OBJECT_TYPE
48 const WCHAR *name; /* object type name used for type validation */
49 void *(*constructor)(HANDLE); /* used for creating an object from server handle */
50 void (*release)(void*); /* called when the last reference is released */
53 struct _EPROCESS
55 DISPATCHER_HEADER header;
56 PROCESS_BASIC_INFORMATION info;
57 BOOL wow64;
60 struct _KTHREAD
62 DISPATCHER_HEADER header;
63 PEPROCESS process;
64 CLIENT_ID id;
65 unsigned int critical_region;
66 KAFFINITY user_affinity;
69 struct _ETHREAD
71 struct _KTHREAD kthread;
74 void *alloc_kernel_object( POBJECT_TYPE type, HANDLE handle, SIZE_T size, LONG ref ) DECLSPEC_HIDDEN;
75 NTSTATUS kernel_object_from_handle( HANDLE handle, POBJECT_TYPE type, void **ret ) DECLSPEC_HIDDEN;
77 extern POBJECT_TYPE ExEventObjectType;
78 extern POBJECT_TYPE ExSemaphoreObjectType;
79 extern POBJECT_TYPE IoDeviceObjectType;
80 extern POBJECT_TYPE IoDriverObjectType;
81 extern POBJECT_TYPE IoFileObjectType;
82 extern POBJECT_TYPE PsProcessType;
83 extern POBJECT_TYPE PsThreadType;
84 extern POBJECT_TYPE SeTokenObjectType;
86 #define DECLARE_CRITICAL_SECTION(cs) \
87 static CRITICAL_SECTION cs; \
88 static CRITICAL_SECTION_DEBUG cs##_debug = \
89 { 0, 0, &cs, { &cs##_debug.ProcessLocksList, &cs##_debug.ProcessLocksList }, \
90 0, 0, { (DWORD_PTR)(__FILE__ ": " # cs) }}; \
91 static CRITICAL_SECTION cs = { &cs##_debug, -1, 0, 0, 0, 0 };
93 struct wine_driver
95 DRIVER_OBJECT driver_obj;
96 DRIVER_EXTENSION driver_extension;
97 SERVICE_STATUS_HANDLE service_handle;
98 struct wine_rb_entry entry;
99 struct list root_pnp_devices;
102 void ObReferenceObject( void *obj ) DECLSPEC_HIDDEN;
104 void pnp_manager_start(void) DECLSPEC_HIDDEN;
105 void pnp_manager_stop_driver( struct wine_driver *driver ) DECLSPEC_HIDDEN;
106 void pnp_manager_stop(void) DECLSPEC_HIDDEN;
108 void CDECL wine_enumerate_root_devices( const WCHAR *driver_name );
110 struct wine_driver *get_driver( const WCHAR *name ) DECLSPEC_HIDDEN;
112 static const WCHAR servicesW[] = {'\\','R','e','g','i','s','t','r','y',
113 '\\','M','a','c','h','i','n','e',
114 '\\','S','y','s','t','e','m',
115 '\\','C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t',
116 '\\','S','e','r','v','i','c','e','s',
117 '\\',0};
119 struct wine_device
121 DEVICE_OBJECT device_obj;
122 DEVICE_RELATIONS *children;
124 #endif