ntoskrnl.exe: Add Ex[p]InterlockedFlushSList.
[wine.git] / dlls / ntoskrnl.exe / ntoskrnl_private.h
blobf5a76284cb01a42a6426716b34b7f30989e0780b
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 struct _OBJECT_TYPE
26 const WCHAR *name; /* object type name used for type validation */
27 void *(*constructor)(HANDLE); /* used for creating an object from server handle */
28 void (*release)(void*); /* called when the last reference is released */
31 struct _KTHREAD
33 DISPATCHER_HEADER header;
34 CLIENT_ID id;
37 void *alloc_kernel_object( POBJECT_TYPE type, HANDLE handle, SIZE_T size, LONG ref ) DECLSPEC_HIDDEN;
38 HANDLE kernel_object_handle( void *obj, unsigned int access ) DECLSPEC_HIDDEN;
39 NTSTATUS kernel_object_from_handle( HANDLE handle, POBJECT_TYPE type, void **ret ) DECLSPEC_HIDDEN;
41 extern POBJECT_TYPE ExEventObjectType;
42 extern POBJECT_TYPE ExSemaphoreObjectType;
43 extern POBJECT_TYPE IoDeviceObjectType;
44 extern POBJECT_TYPE IoDriverObjectType;
45 extern POBJECT_TYPE IoFileObjectType;
46 extern POBJECT_TYPE PsProcessType;
47 extern POBJECT_TYPE PsThreadType;
48 extern POBJECT_TYPE SeTokenObjectType;
51 #ifdef __i386__
52 #define DEFINE_FASTCALL1_WRAPPER(func) \
53 __ASM_STDCALL_FUNC( __fastcall_ ## func, 4, \
54 "popl %eax\n\t" \
55 "pushl %ecx\n\t" \
56 "pushl %eax\n\t" \
57 "jmp " __ASM_NAME(#func) __ASM_STDCALL(4) )
58 #define DEFINE_FASTCALL_WRAPPER(func,args) \
59 __ASM_STDCALL_FUNC( __fastcall_ ## func, args, \
60 "popl %eax\n\t" \
61 "pushl %edx\n\t" \
62 "pushl %ecx\n\t" \
63 "pushl %eax\n\t" \
64 "jmp " __ASM_NAME(#func) __ASM_STDCALL(args) )
65 #else
66 #define DEFINE_FASTCALL1_WRAPPER(func) /* nothing */
67 #define DEFINE_FASTCALL_WRAPPER(func,args) /* nothing */
68 #endif
70 #endif