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
15110b17
Commit
15110b17
authored
Jul 01, 2015
by
Sebastian Lackner
Committed by
Alexandre Julliard
Jul 02, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Implement TpCallbackSetEventOnCompletion.
parent
3dc1c644
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
1 deletion
+22
-1
ntdll.spec
dlls/ntdll/ntdll.spec
+1
-0
threadpool.c
dlls/ntdll/threadpool.c
+21
-1
No files found.
dlls/ntdll/ntdll.spec
View file @
15110b17
...
...
@@ -977,6 +977,7 @@
@ stdcall TpCallbackMayRunLong(ptr)
@ stdcall TpCallbackReleaseMutexOnCompletion(ptr long)
@ stdcall TpCallbackReleaseSemaphoreOnCompletion(ptr long long)
@ stdcall TpCallbackSetEventOnCompletion(ptr long)
@ stdcall TpPostWork(ptr)
@ stdcall TpReleaseCleanupGroup(ptr)
@ stdcall TpReleaseCleanupGroupMembers(ptr long ptr)
...
...
dlls/ntdll/threadpool.c
View file @
15110b17
...
...
@@ -209,6 +209,7 @@ struct threadpool_instance
HANDLE
mutex
;
HANDLE
semaphore
;
LONG
semaphore_count
;
HANDLE
event
;
}
cleanup
;
};
...
...
@@ -1642,6 +1643,7 @@ static void CALLBACK threadpool_worker_proc( void *param )
instance
.
cleanup
.
mutex
=
NULL
;
instance
.
cleanup
.
semaphore
=
NULL
;
instance
.
cleanup
.
semaphore_count
=
0
;
instance
.
cleanup
.
event
=
NULL
;
switch
(
object
->
type
)
{
...
...
@@ -1689,7 +1691,12 @@ static void CALLBACK threadpool_worker_proc( void *param )
}
if
(
instance
.
cleanup
.
semaphore
)
{
NtReleaseSemaphore
(
instance
.
cleanup
.
semaphore
,
instance
.
cleanup
.
semaphore_count
,
NULL
);
status
=
NtReleaseSemaphore
(
instance
.
cleanup
.
semaphore
,
instance
.
cleanup
.
semaphore_count
,
NULL
);
if
(
status
!=
STATUS_SUCCESS
)
goto
skip_cleanup
;
}
if
(
instance
.
cleanup
.
event
)
{
NtSetEvent
(
instance
.
cleanup
.
event
,
NULL
);
}
skip_cleanup:
...
...
@@ -1873,6 +1880,19 @@ VOID WINAPI TpCallbackReleaseSemaphoreOnCompletion( TP_CALLBACK_INSTANCE *instan
}
/***********************************************************************
* TpCallbackSetEventOnCompletion (NTDLL.@)
*/
VOID
WINAPI
TpCallbackSetEventOnCompletion
(
TP_CALLBACK_INSTANCE
*
instance
,
HANDLE
event
)
{
struct
threadpool_instance
*
this
=
impl_from_TP_CALLBACK_INSTANCE
(
instance
);
TRACE
(
"%p %p
\n
"
,
instance
,
event
);
if
(
!
this
->
cleanup
.
event
)
this
->
cleanup
.
event
=
event
;
}
/***********************************************************************
* TpPostWork (NTDLL.@)
*/
VOID
WINAPI
TpPostWork
(
TP_WORK
*
work
)
...
...
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