Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
7f826665
Commit
7f826665
authored
Dec 17, 2001
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not call THUNK_Init at startup, only do it when the app actually
requires thunks.
parent
8eeed94f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
kernel_main.c
dlls/kernel/kernel_main.c
+0
-5
thunk.c
dlls/kernel/thunk.c
+7
-2
No files found.
dlls/kernel/kernel_main.c
View file @
7f826665
...
...
@@ -11,7 +11,6 @@
#include "winbase.h"
#include "wine/winbase16.h"
#include "callback.h"
#include "global.h"
#include "miscemu.h"
#include "module.h"
...
...
@@ -19,7 +18,6 @@
extern
void
CODEPAGE_Init
(
void
);
extern
BOOL
RELAY_Init
(
void
);
extern
BOOL
THUNK_Init
(
void
);
/***********************************************************************
...
...
@@ -35,9 +33,6 @@ static BOOL process_attach(void)
/* Initialize relay entry points */
if
(
!
RELAY_Init
())
return
FALSE
;
/* Initialize thunking */
if
(
!
THUNK_Init
())
return
FALSE
;
/* Initialize DOS memory */
if
(
!
DOSMEM_Init
(
0
))
return
FALSE
;
...
...
dlls/kernel/thunk.c
View file @
7f826665
...
...
@@ -16,7 +16,6 @@
#include "winerror.h"
#include "wine/winbase16.h"
#include "callback.h"
#include "debugtools.h"
#include "flatthunk.h"
#include "heap.h"
...
...
@@ -1463,13 +1462,14 @@ static SEGPTR ThunkletCallbackGlueSL = 0;
/* map a thunk allocated on ThunkletHeap to a 16-bit pointer */
inline
static
SEGPTR
get_segptr
(
void
*
thunk
)
{
if
(
!
thunk
)
return
0
;
return
MAKESEGPTR
(
ThunkletCodeSel
,
(
char
*
)
thunk
-
(
char
*
)
ThunkletHeap
);
}
/***********************************************************************
* THUNK_Init
*/
BOOL
THUNK_Init
(
void
)
static
BOOL
THUNK_Init
(
void
)
{
LPBYTE
thunk
;
...
...
@@ -1534,6 +1534,7 @@ FARPROC THUNK_AllocLSThunklet( SEGPTR target, DWORD relay,
{
TDB
*
pTask
=
TASK_GetPtr
(
owner
);
if
(
!
ThunkletHeap
)
THUNK_Init
();
if
(
!
(
thunk
=
HeapAlloc
(
ThunkletHeap
,
0
,
sizeof
(
THUNKLET
)
))
)
return
0
;
...
...
@@ -1567,6 +1568,7 @@ SEGPTR THUNK_AllocSLThunklet( FARPROC target, DWORD relay,
{
TDB
*
pTask
=
TASK_GetPtr
(
owner
);
if
(
!
ThunkletHeap
)
THUNK_Init
();
if
(
!
(
thunk
=
HeapAlloc
(
ThunkletHeap
,
0
,
sizeof
(
THUNKLET
)
))
)
return
0
;
...
...
@@ -1616,6 +1618,7 @@ BOOL16 WINAPI IsSLThunklet16( THUNKLET *thunk )
FARPROC
WINAPI
AllocLSThunkletSysthunk16
(
SEGPTR
target
,
FARPROC
relay
,
DWORD
dummy
)
{
if
(
!
ThunkletSysthunkGlueLS
)
THUNK_Init
();
return
THUNK_AllocLSThunklet
(
(
SEGPTR
)
relay
,
(
DWORD
)
target
,
ThunkletSysthunkGlueLS
,
GetCurrentTask
()
);
}
...
...
@@ -1626,6 +1629,7 @@ FARPROC WINAPI AllocLSThunkletSysthunk16( SEGPTR target,
SEGPTR
WINAPI
AllocSLThunkletSysthunk16
(
FARPROC
target
,
SEGPTR
relay
,
DWORD
dummy
)
{
if
(
!
ThunkletSysthunkGlueSL
)
THUNK_Init
();
return
THUNK_AllocSLThunklet
(
(
FARPROC
)
relay
,
(
DWORD
)
target
,
ThunkletSysthunkGlueSL
,
GetCurrentTask
()
);
}
...
...
@@ -1877,6 +1881,7 @@ SEGPTR WINAPI Get16DLLAddress(HMODULE handle, LPSTR func_name)
if
(
!
code_sel32
)
{
if
(
!
ThunkletHeap
)
THUNK_Init
();
code_sel32
=
SELECTOR_AllocBlock
(
(
void
*
)
ThunkletHeap
,
0x10000
,
WINE_LDT_FLAGS_CODE
|
WINE_LDT_FLAGS_32BIT
);
if
(
!
code_sel32
)
return
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment