wine  6.0.1
About: Wine is an Open Source implementation of the MS Windows API on top of X, OpenGL, and Unix. Think of Wine as a compatibility layer for running Windows programs.
  Fossies Dox: wine-6.0.1.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

ntoskrnl_private.h
Go to the documentation of this file.
1 /*
2  * ntoskrnl.exe implementation
3  *
4  * Copyright (C) 2007 Alexandre Julliard
5  *
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.
10  *
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.
15  *
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
19  */
20 
21 #ifndef __WINE_NTOSKRNL_PRIVATE_H
22 #define __WINE_NTOSKRNL_PRIVATE_H
23 
24 #include "wine/asm.h"
25 
26 static inline LPCSTR debugstr_us( const UNICODE_STRING *us )
27 {
28  if (!us) return "<null>";
29  return debugstr_wn( us->Buffer, us->Length / sizeof(WCHAR) );
30 }
31 
33 {
34  const WCHAR *name; /* object type name used for type validation */
35  void *(*constructor)(HANDLE); /* used for creating an object from server handle */
36  void (*release)(void*); /* called when the last reference is released */
37 };
38 
39 struct _EPROCESS
40 {
44 };
45 
46 struct _KTHREAD
47 {
51  unsigned int critical_region;
53 };
54 
55 struct _ETHREAD
56 {
57  struct _KTHREAD kthread;
58 };
59 
62 
71 
72 #define DECLARE_CRITICAL_SECTION(cs) \
73  static CRITICAL_SECTION cs; \
74  static CRITICAL_SECTION_DEBUG cs##_debug = \
75  { 0, 0, &cs, { &cs##_debug.ProcessLocksList, &cs##_debug.ProcessLocksList }, \
76  0, 0, { (DWORD_PTR)(__FILE__ ": " # cs) }}; \
77  static CRITICAL_SECTION cs = { &cs##_debug, -1, 0, 0, 0, 0 };
78 
80 
84 
85 static const WCHAR servicesW[] = {'\\','R','e','g','i','s','t','r','y',
86  '\\','M','a','c','h','i','n','e',
87  '\\','S','y','s','t','e','m',
88  '\\','C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t',
89  '\\','S','e','r','v','i','c','e','s',
90  '\\',0};
91 
93 {
96 };
97 #endif
ULONG_PTR KAFFINITY
Definition: basetsd.h:266
ULONG_PTR SIZE_T
Definition: basetsd.h:264
LONG NTSTATUS
Definition: bcrypt.h:40
Definition: type.pm:7
long BOOL
Definition: dxgitype.idl:24
static const char * debugstr_wn(const WCHAR *wstr, unsigned int n)
Definition: emf.c:48
#define DECLSPEC_HIDDEN
Definition: macdrv_cocoa.h:96
void(CDECL *mono_callspec_set_assembly)(MonoAssembly *assembly) DECLSPEC_HIDDEN
basic_istream_char obj
Definition: ios.c:13778
POBJECT_TYPE IoDriverObjectType
Definition: ntoskrnl.c:1409
void pnp_manager_stop(void) DECLSPEC_HIDDEN
Definition: pnp.c:1062
POBJECT_TYPE IoDeviceObjectType
Definition: ntoskrnl.c:1484
POBJECT_TYPE PsThreadType
Definition: ntoskrnl.c:2333
POBJECT_TYPE IoFileObjectType
Definition: ntoskrnl.c:413
static const WCHAR servicesW[]
POBJECT_TYPE PsProcessType
Definition: ntoskrnl.c:2250
void pnp_manager_start(void) DECLSPEC_HIDDEN
Definition: pnp.c:1031
void ObReferenceObject(void *obj) DECLSPEC_HIDDEN
Definition: ntoskrnl.c:221
static LPCSTR debugstr_us(const UNICODE_STRING *us)
NTSTATUS kernel_object_from_handle(HANDLE handle, POBJECT_TYPE type, void **ret) DECLSPEC_HIDDEN
Definition: ntoskrnl.c:273
POBJECT_TYPE ExEventObjectType
Definition: sync.c:217
POBJECT_TYPE SeTokenObjectType
Definition: ntoskrnl.c:3986
void pnp_manager_enumerate_root_devices(const WCHAR *driver_name) DECLSPEC_HIDDEN
Definition: pnp.c:1069
POBJECT_TYPE ExSemaphoreObjectType
Definition: sync.c:379
void * alloc_kernel_object(POBJECT_TYPE type, HANDLE handle, SIZE_T size, LONG ref) DECLSPEC_HIDDEN
Definition: ntoskrnl.c:154
DISPATCHER_HEADER header
PROCESS_BASIC_INFORMATION info
struct _KTHREAD kthread
KAFFINITY user_affinity
unsigned int critical_region
DISPATCHER_HEADER header
CLIENT_ID id
PEPROCESS process
void(* release)(void *)
const WCHAR * name
USHORT Length
Definition: ntsecapi.h:154
Definition: ticket.c:41
DEVICE_OBJECT device_obj
DEVICE_RELATIONS * children
const CHAR * LPCSTR
Definition: winnt.h:502
unsigned short WCHAR
Definition: winnt.h:468
int LONG
Definition: winnt.h:459
void * HANDLE
Definition: winnt.h:578