Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
e5cef3b0
Commit
e5cef3b0
authored
Feb 27, 2003
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved CreateThread16 to kernel, and made it use WOWCallback16.
parent
41018add
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
26 deletions
+29
-26
wowthunk.c
dlls/kernel/wowthunk.c
+29
-1
thread.c
scheduler/thread.c
+0
-25
No files found.
dlls/kernel/wowthunk.c
View file @
e5cef3b0
...
...
@@ -52,6 +52,20 @@ DWORD WINAPI FreeLibrary32W16(DWORD);
DWORD
WINAPI
CallProcExW16
(
VOID
);
DWORD
WINAPI
CallProcEx32W16
(
VOID
);
/* thunk for 16-bit CreateThread */
struct
thread_args
{
FARPROC16
proc
;
DWORD
param
;
};
static
DWORD
CALLBACK
start_thread16
(
LPVOID
threadArgs
)
{
struct
thread_args
args
=
*
(
struct
thread_args
*
)
threadArgs
;
HeapFree
(
GetProcessHeap
(),
0
,
threadArgs
);
return
K32WOWCallback16
(
(
DWORD
)
args
.
proc
,
args
.
param
);
}
/*
* 32-bit WOW routines (in WOW32, but actually forwarded to KERNEL32)
*/
...
...
@@ -285,7 +299,6 @@ BOOL WINAPI K32WOWCallback16Ex( DWORD vpfn16, DWORD dwFlags,
*/
memcpy
(
(
LPBYTE
)
CURRENT_STACK16
-
cbArgs
,
(
LPBYTE
)
pArgs
,
cbArgs
);
/*
* Actually, we should take care whether the called routine cleans up
* its stack or not. Fortunately, our wine_call_to_16 core doesn't rely on
...
...
@@ -537,3 +550,18 @@ DWORD WINAPI WOW16Call(WORD x,WORD y,WORD z)
DPRINTF
(
") calling address was 0x%08lx
\n
"
,
calladdr
);
return
0
;
}
/***********************************************************************
* CreateThread16 (KERNEL.441)
*/
HANDLE
WINAPI
CreateThread16
(
SECURITY_ATTRIBUTES
*
sa
,
DWORD
stack
,
FARPROC16
start
,
SEGPTR
param
,
DWORD
flags
,
LPDWORD
id
)
{
struct
thread_args
*
args
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
args
)
);
if
(
!
args
)
return
INVALID_HANDLE_VALUE
;
args
->
proc
=
start
;
args
->
param
=
param
;
return
CreateThread
(
sa
,
stack
,
start_thread16
,
args
,
flags
,
id
);
}
scheduler/thread.c
View file @
e5cef3b0
...
...
@@ -331,31 +331,6 @@ HANDLE WINAPI CreateThread( SECURITY_ATTRIBUTES *sa, SIZE_T stack,
}
/***********************************************************************
* CreateThread16 (KERNEL.441)
*/
static
DWORD
CALLBACK
THREAD_StartThread16
(
LPVOID
threadArgs
)
{
FARPROC16
start
=
((
FARPROC16
*
)
threadArgs
)[
0
];
DWORD
param
=
((
DWORD
*
)
threadArgs
)[
1
];
HeapFree
(
GetProcessHeap
(),
0
,
threadArgs
);
((
LPDWORD
)
CURRENT_STACK16
)[
-
1
]
=
param
;
return
wine_call_to_16
(
start
,
sizeof
(
DWORD
)
);
}
HANDLE
WINAPI
CreateThread16
(
SECURITY_ATTRIBUTES
*
sa
,
DWORD
stack
,
FARPROC16
start
,
SEGPTR
param
,
DWORD
flags
,
LPDWORD
id
)
{
DWORD
*
threadArgs
=
HeapAlloc
(
GetProcessHeap
(),
0
,
2
*
sizeof
(
DWORD
)
);
if
(
!
threadArgs
)
return
INVALID_HANDLE_VALUE
;
threadArgs
[
0
]
=
(
DWORD
)
start
;
threadArgs
[
1
]
=
(
DWORD
)
param
;
return
CreateThread
(
sa
,
stack
,
THREAD_StartThread16
,
threadArgs
,
flags
,
id
);
}
/***********************************************************************
* ExitThread [KERNEL32.@] Ends a thread
*
* RETURNS
...
...
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