Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sam Joan Roque-Worcel
wine
Commits
7f826665
Commit
7f826665
authored
23 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
Do not call THUNK_Init at startup, only do it when the app actually
requires thunks.
parent
8eeed94f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dlls/kernel/kernel_main.c
+0
-5
0 additions, 5 deletions
dlls/kernel/kernel_main.c
dlls/kernel/thunk.c
+7
-2
7 additions, 2 deletions
dlls/kernel/thunk.c
with
7 additions
and
7 deletions
dlls/kernel/kernel_main.c
+
0
−
5
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
;
...
...
This diff is collapsed.
Click to expand it.
dlls/kernel/thunk.c
+
7
−
2
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
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment