Don't create thunk for task signal proc, call it directly.
[wine] / include / builtin16.h
1 /*
2  * Win16 built-in DLLs definitions
3  *
4  * Copyright 1999 Ulrich Weigand
5  */
6
7 #ifndef __WINE_BUILTIN16_H
8 #define __WINE_BUILTIN16_H
9
10 #include "windef.h"
11 #include "ldt.h"
12
13 struct _CONTEXT86;
14 struct _STACK16FRAME;
15
16 extern BOOL BUILTIN_Init(void);
17 extern HMODULE16 BUILTIN_LoadModule( LPCSTR name, BOOL force );
18 extern LPCSTR BUILTIN_GetEntryPoint16( struct _STACK16FRAME *frame, LPSTR name, WORD *pOrd );
19
20 extern void RELAY_Unimplemented16(void);
21
22 extern WORD CallFrom16Word();
23 extern LONG CallFrom16Long();
24 extern void CallFrom16Register();
25 extern void CallFrom16Thunk();
26
27 extern WORD CALLBACK CallTo16Word( FARPROC16 target, INT nArgs );
28 extern LONG CALLBACK CallTo16Long( FARPROC16 target, INT nArgs );
29 extern LONG CALLBACK CallTo16RegisterShort( const struct _CONTEXT86 *context, INT nArgs );
30 extern LONG CALLBACK CallTo16RegisterLong ( const struct _CONTEXT86 *context, INT nArgs );
31
32 #include "pshpack1.h"
33
34 typedef struct
35 {
36     WORD   pushw_bp;               /* pushw %bp */
37     BYTE   pushl;                  /* pushl $target */
38     void (*target)();
39     WORD   call;                   /* call CALLFROM16 */
40     WORD   callfrom16;
41 } ENTRYPOINT16;
42
43 #define EP(target, offset) { 0x5566, 0x68, (target), 0xe866, (offset) }
44
45 typedef struct
46 {
47     BYTE   pushl;                  /* pushl $relay */
48     DWORD  relay;
49     BYTE   lcall;                  /* lcall __FLATCS__:glue */
50     DWORD  glue;
51     WORD   flatcs;
52     BYTE   prefix;                 /* lret $nArgs */
53     BYTE   lret;
54     WORD   nArgs;
55     LPCSTR profile;                /* profile string */
56 } CALLFROM16;
57
58 #define CF16_WORD( relay, nArgs, profile ) \
59   { 0x68, (DWORD)(relay), \
60     0x9a, (DWORD)CallFrom16Word, __FLATCS__, \
61     0x66, (nArgs)? 0xca : 0xcb, (nArgs)? (nArgs) : 0x9090, \
62     (profile) }
63
64 #define CF16_LONG( relay, nArgs, profile ) \
65   { 0x68, (DWORD)(relay), \
66     0x9a, (DWORD)CallFrom16Long, __FLATCS__, \
67     0x66, (nArgs)? 0xca : 0xcb, (nArgs)? (nArgs) : 0x9090, \
68     (profile) }
69
70 #define CF16_REGS( relay, nArgs, profile ) \
71   { 0x68, (DWORD)(relay), \
72     0x9a, (DWORD)CallFrom16Register, __FLATCS__, \
73     0x66, (nArgs)? 0xca : 0xcb, (nArgs)? (nArgs) : 0x9090, \
74     (profile) }
75
76 #include "poppack.h"
77
78 typedef struct
79 {
80     const char *name;              /* DLL name */
81     void       *module_start;      /* 32-bit address of the module data */
82     int         module_size;       /* Size of the module data */
83     const BYTE *code_start;        /* 32-bit address of DLL code */
84     const BYTE *data_start;        /* 32-bit address of DLL data */
85 } WIN16_DESCRIPTOR;
86
87
88 #endif /* __WINE_BUILTIN16_H */