include: Move inline assembly definitions to a new wine/asm.h header.
[wine.git] / dlls / ntoskrnl.exe / ntoskrnl_private.h
blob65e272939723818ccc2f21d3ab9183e444857aa1
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 "wine/asm.h"
26 struct _OBJECT_TYPE
28 const WCHAR *name; /* object type name used for type validation */
29 void *(*constructor)(HANDLE); /* used for creating an object from server handle */
30 void (*release)(void*); /* called when the last reference is released */
33 struct _EPROCESS
35 DISPATCHER_HEADER header;
36 PROCESS_BASIC_INFORMATION info;
39 struct _KTHREAD
41 DISPATCHER_HEADER header;
42 PEPROCESS process;
43 CLIENT_ID id;
46 struct _ETHREAD
48 struct _KTHREAD kthread;
51 void *alloc_kernel_object( POBJECT_TYPE type, HANDLE handle, SIZE_T size, LONG ref ) DECLSPEC_HIDDEN;
52 NTSTATUS kernel_object_from_handle( HANDLE handle, POBJECT_TYPE type, void **ret ) DECLSPEC_HIDDEN;
54 extern POBJECT_TYPE ExEventObjectType;
55 extern POBJECT_TYPE ExSemaphoreObjectType;
56 extern POBJECT_TYPE IoDeviceObjectType;
57 extern POBJECT_TYPE IoDriverObjectType;
58 extern POBJECT_TYPE IoFileObjectType;
59 extern POBJECT_TYPE PsProcessType;
60 extern POBJECT_TYPE PsThreadType;
61 extern POBJECT_TYPE SeTokenObjectType;
64 #ifdef __i386__
65 #define DEFINE_FASTCALL1_WRAPPER(func) \
66 __ASM_STDCALL_FUNC( __fastcall_ ## func, 4, \
67 "popl %eax\n\t" \
68 "pushl %ecx\n\t" \
69 "pushl %eax\n\t" \
70 "jmp " __ASM_NAME(#func) __ASM_STDCALL(4) )
71 #define DEFINE_FASTCALL_WRAPPER(func,args) \
72 __ASM_STDCALL_FUNC( __fastcall_ ## func, args, \
73 "popl %eax\n\t" \
74 "pushl %edx\n\t" \
75 "pushl %ecx\n\t" \
76 "pushl %eax\n\t" \
77 "jmp " __ASM_NAME(#func) __ASM_STDCALL(args) )
78 #else
79 #define DEFINE_FASTCALL1_WRAPPER(func) /* nothing */
80 #define DEFINE_FASTCALL_WRAPPER(func,args) /* nothing */
81 #endif
83 #endif