Commit 19bfcd35 authored by Alexandre Julliard's avatar Alexandre Julliard

Moved the remaining stack frame definitions to kernel_private.h and

removed stackframe.h.
parent 827a69f8
......@@ -42,7 +42,6 @@
#include "wine/unicode.h"
#include "wine/winbase16.h"
#include "kernel_private.h"
#include "stackframe.h"
#include "wine/debug.h"
......
......@@ -25,7 +25,7 @@
#include "wine/winbase16.h"
#include "wine/server.h"
#include "ntstatus.h"
#include "stackframe.h"
#include "kernel_private.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(debugstr);
......
......@@ -25,7 +25,7 @@
#include "windef.h"
#include "winbase.h"
#include "stackframe.h"
#include "wine/winbase16.h"
#include "wine/debug.h"
......
......@@ -40,7 +40,6 @@
#include "wine/winbase16.h"
#include "ntstatus.h"
#include "toolhelp.h"
#include "stackframe.h"
#include "kernel_private.h"
#include "wine/debug.h"
#include "winerror.h"
......
......@@ -40,7 +40,6 @@
#include "wine/library.h"
#include "module.h"
#include "thread.h"
#include "stackframe.h"
#include "wincon.h"
#include "toolhelp.h"
#include "kernel_private.h"
......
......@@ -21,6 +21,9 @@
#ifndef __WINE_KERNEL_PRIVATE_H
#define __WINE_KERNEL_PRIVATE_H
#include "wine/winbase16.h"
#include "thread.h"
HANDLE WINAPI OpenConsoleW(LPCWSTR, DWORD, BOOL, DWORD);
BOOL WINAPI VerifyConsoleIoHandle(HANDLE);
HANDLE WINAPI DuplicateConsoleHandle(HANDLE, DWORD, BOOL, DWORD);
......@@ -44,6 +47,26 @@ static inline HANDLE console_handle_unmap(HANDLE h)
return h != INVALID_HANDLE_VALUE ? (HANDLE)((DWORD)h ^ 3) : INVALID_HANDLE_VALUE;
}
#define CURRENT_STACK16 ((STACK16FRAME*)MapSL((SEGPTR)NtCurrentTeb()->WOW32Reserved))
#define CURRENT_DS (CURRENT_STACK16->ds)
/* push bytes on the 16-bit stack of a thread; return a segptr to the first pushed byte */
static inline SEGPTR stack16_push( int size )
{
STACK16FRAME *frame = CURRENT_STACK16;
memmove( (char*)frame - size, frame, sizeof(*frame) );
NtCurrentTeb()->WOW32Reserved = (char *)NtCurrentTeb()->WOW32Reserved - size;
return (SEGPTR)((char *)NtCurrentTeb()->WOW32Reserved + sizeof(*frame));
}
/* pop bytes from the 16-bit stack of a thread */
static inline void stack16_pop( int size )
{
STACK16FRAME *frame = CURRENT_STACK16;
memmove( (char*)frame + size, frame, sizeof(*frame) );
NtCurrentTeb()->WOW32Reserved = (char *)NtCurrentTeb()->WOW32Reserved + size;
}
extern HMODULE kernel32_handle;
/* Size of per-process table of DOS handles */
......
......@@ -36,7 +36,6 @@
#include "wine/winbase16.h"
#include "wownt32.h"
#include "module.h"
#include "stackframe.h"
#include "toolhelp.h"
#include "kernel_private.h"
#include "wine/debug.h"
......
......@@ -37,8 +37,8 @@
#include "wownt32.h"
#include "module.h"
#include "toolhelp.h"
#include "stackframe.h"
#include "excpt.h"
#include "kernel_private.h"
#include "wine/exception.h"
#include "wine/debug.h"
......
......@@ -38,7 +38,6 @@
#include "wine/library.h"
#include "kernel_private.h"
#include "module.h"
#include "stackframe.h"
#include "toolhelp.h"
#include "wine/debug.h"
......
......@@ -30,7 +30,6 @@
#include "winbase.h"
#include "wine/winbase16.h"
#include "module.h"
#include "stackframe.h"
#include "kernel_private.h"
#include "wine/unicode.h"
#include "wine/library.h"
......
......@@ -32,7 +32,6 @@
#include "wine/library.h"
#include "kernel_private.h"
#include "module.h"
#include "stackframe.h"
#include "toolhelp.h"
#include "wine/debug.h"
......
......@@ -28,7 +28,7 @@
#include "wine/winbase16.h"
#include "wine/winuser16.h"
#include "wownt32.h"
#include "stackframe.h"
#include "kernel_private.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(system);
......
......@@ -40,7 +40,6 @@
#include "module.h"
#include "winternl.h"
#include "wine/server.h"
#include "stackframe.h"
#include "thread.h"
#include "toolhelp.h"
#include "kernel_private.h"
......
......@@ -42,7 +42,6 @@
#include "wine/debug.h"
#include "wine/library.h"
#include "module.h"
#include "stackframe.h"
#include "kernel_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(thunk);
......
......@@ -32,6 +32,7 @@
#include "winbase.h"
#include "wine/winbase16.h"
#include "winerror.h"
#include "thread.h"
#include "local.h"
#include "tlhelp32.h"
#include "toolhelp.h"
......
......@@ -33,7 +33,6 @@
#include "winreg.h"
#include "winternl.h"
#include "module.h"
#include "stackframe.h"
#include "kernel_private.h"
#include "wine/exception.h"
#include "wine/debug.h"
......
......@@ -24,7 +24,10 @@
#include <windef.h>
#include <wine/windef16.h>
#include <wine/winbase16.h>
#include <stackframe.h>
#include <winreg.h>
#include <winternl.h>
#define CURRENT_DS (((STACK16FRAME*)MapSL((SEGPTR)NtCurrentTeb()->WOW32Reserved))->ds)
/* These function are equivalent to the Local* API functions, */
/* excepted that they need DS as the first parameter. This */
......
/*
* 16-bit and 32-bit mode stack frame layout
*
* Copyright 1995, 1998 Alexandre Julliard
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __WINE_STACKFRAME_H
#define __WINE_STACKFRAME_H
#include <string.h>
#include <stdarg.h>
#include <windef.h>
#include <winbase.h>
#include <winnt.h>
#include <winreg.h>
#include <winternl.h>
#include <thread.h>
#include <wine/winbase16.h>
#define CURRENT_STACK16 ((STACK16FRAME*)MapSL((SEGPTR)NtCurrentTeb()->WOW32Reserved))
#define CURRENT_DS (CURRENT_STACK16->ds)
/* Push bytes on the 16-bit stack of a thread;
* return a segptr to the first pushed byte
*/
static inline SEGPTR stack16_push( int size )
{
STACK16FRAME *frame = CURRENT_STACK16;
memmove( (char*)frame - size, frame, sizeof(*frame) );
NtCurrentTeb()->WOW32Reserved = (char *)NtCurrentTeb()->WOW32Reserved - size;
return (SEGPTR)((char *)NtCurrentTeb()->WOW32Reserved + sizeof(*frame));
}
/* Pop bytes from the 16-bit stack of a thread */
static inline void stack16_pop( int size )
{
STACK16FRAME *frame = CURRENT_STACK16;
memmove( (char*)frame + size, frame, sizeof(*frame) );
NtCurrentTeb()->WOW32Reserved = (char *)NtCurrentTeb()->WOW32Reserved + size;
}
#endif /* __WINE_STACKFRAME_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment