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
b66e13ef
Commit
b66e13ef
authored
Apr 15, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Apr 15, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernelbase: Implement CreateThreadpoolIo.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1da0d174
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
6 deletions
+14
-6
thread.c
dlls/kernelbase/thread.c
+12
-3
threadpool.c
dlls/ntdll/tests/threadpool.c
+1
-3
threadpool.c
dlls/ntdll/threadpool.c
+1
-0
No files found.
dlls/kernelbase/thread.c
View file @
b66e13ef
...
...
@@ -1187,14 +1187,23 @@ PTP_CLEANUP_GROUP WINAPI DECLSPEC_HOTPATCH CreateThreadpoolCleanupGroup(void)
}
static
void
WINAPI
tp_io_callback
(
TP_CALLBACK_INSTANCE
*
instance
,
void
*
userdata
,
void
*
cvalue
,
IO_STATUS_BLOCK
*
iosb
,
TP_IO
*
io
)
{
PTP_WIN32_IO_CALLBACK
callback
=
*
(
void
**
)
io
;
callback
(
instance
,
userdata
,
cvalue
,
RtlNtStatusToDosError
(
iosb
->
u
.
Status
),
iosb
->
Information
,
io
);
}
/***********************************************************************
* CreateThreadpoolIo (kernelbase.@)
*/
PTP_IO
WINAPI
/* DECLSPEC_HOTPATCH */
CreateThreadpoolIo
(
HANDLE
handle
,
PTP_WIN32_IO_CALLBACK
callback
,
PTP_IO
WINAPI
DECLSPEC_HOTPATCH
CreateThreadpoolIo
(
HANDLE
handle
,
PTP_WIN32_IO_CALLBACK
callback
,
PVOID
userdata
,
TP_CALLBACK_ENVIRON
*
environment
)
{
FIXME
(
"(%p, %p, %p, %p): stub
\n
"
,
handle
,
callback
,
userdata
,
environment
);
return
FALSE
;
TP_IO
*
io
;
if
(
!
set_ntstatus
(
TpAllocIoCompletion
(
&
io
,
handle
,
tp_io_callback
,
userdata
,
environment
)))
return
NULL
;
*
(
void
**
)
io
=
callback
;
/* ntdll leaves us space to store our callback at the beginning of TP_IO struct */
return
io
;
}
...
...
dlls/ntdll/tests/threadpool.c
View file @
b66e13ef
...
...
@@ -2130,9 +2130,7 @@ static void test_kernel32_tp_io(void)
environment
.
Pool
=
pool
;
io
=
NULL
;
io
=
pCreateThreadpoolIo
(
server
,
kernel32_io_cb
,
&
userdata
,
&
environment
);
todo_wine
ok
(
!!
io
,
"expected non-NULL TP_IO
\n
"
);
if
(
!
io
)
return
;
ok
(
!!
io
,
"expected non-NULL TP_IO
\n
"
);
pWaitForThreadpoolIoCallbacks
(
io
,
FALSE
);
...
...
dlls/ntdll/threadpool.c
View file @
b66e13ef
...
...
@@ -153,6 +153,7 @@ struct io_completion
/* internal threadpool object representation */
struct
threadpool_object
{
void
*
win32_callback
;
/* leave space for kernelbase to store win32 callback */
LONG
refcount
;
BOOL
shutdown
;
/* read-only information */
...
...
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