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
bc8f74f9
Commit
bc8f74f9
authored
Aug 20, 2016
by
Sebastian Lackner
Committed by
Alexandre Julliard
Aug 22, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
services: Remove synchronization for CloseThreadpoolCleanupGroupMembers.
Signed-off-by:
Sebastian Lackner
<
sebastian@fds-team.de
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a9f648ef
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
20 deletions
+8
-20
rpc.c
programs/services/rpc.c
+8
-20
No files found.
programs/services/rpc.c
View file @
bc8f74f9
...
...
@@ -85,30 +85,22 @@ struct sc_lock
struct
scmdatabase
*
db
;
};
static
CRITICAL_SECTION
shutdown_cs
;
static
CRITICAL_SECTION_DEBUG
critsect_debug
=
{
0
,
0
,
&
shutdown_cs
,
{
&
critsect_debug
.
ProcessLocksList
,
&
critsect_debug
.
ProcessLocksList
},
0
,
0
,
{
(
DWORD_PTR
)(
__FILE__
": shutdown_cs"
)
}
};
static
CRITICAL_SECTION
shutdown_cs
=
{
&
critsect_debug
,
-
1
,
0
,
0
,
0
,
0
};
static
BOOL
service_shutdown
;
static
PTP_CLEANUP_GROUP
cleanup_group
;
HANDLE
exit_event
;
static
void
CALLBACK
group_cancel_callback
(
void
*
object
,
void
*
userdata
)
{
struct
process_entry
*
process
=
object
;
release_process
(
process
);
}
static
void
CALLBACK
terminate_callback
(
TP_CALLBACK_INSTANCE
*
instance
,
void
*
context
,
TP_WAIT
*
wait
,
TP_WAIT_RESULT
result
)
{
struct
process_entry
*
process
=
context
;
if
(
result
==
WAIT_TIMEOUT
)
process_terminate
(
process
);
release_process
(
process
);
/* synchronize with CloseThreadpoolCleanupGroupMembers */
EnterCriticalSection
(
&
shutdown_cs
);
if
(
!
service_shutdown
)
CloseThreadpoolWait
(
wait
);
LeaveCriticalSection
(
&
shutdown_cs
);
CloseThreadpoolWait
(
wait
);
}
static
void
terminate_after_timeout
(
struct
process_entry
*
process
,
DWORD
timeout
)
...
...
@@ -121,6 +113,7 @@ static void terminate_after_timeout(struct process_entry *process, DWORD timeout
memset
(
&
environment
,
0
,
sizeof
(
environment
));
environment
.
Version
=
1
;
environment
.
CleanupGroup
=
cleanup_group
;
environment
.
CleanupGroupCancelCallback
=
group_cancel_callback
;
timestamp
.
QuadPart
=
(
ULONGLONG
)
timeout
*
-
10000
;
ft
.
dwLowDateTime
=
timestamp
.
u
.
LowPart
;
...
...
@@ -1914,11 +1907,6 @@ void RPC_Stop(void)
RpcMgmtStopServerListening
(
NULL
);
RpcServerUnregisterIf
(
svcctl_v2_0_s_ifspec
,
NULL
,
TRUE
);
/* synchronize with CloseThreadpoolWait */
EnterCriticalSection
(
&
shutdown_cs
);
service_shutdown
=
TRUE
;
LeaveCriticalSection
(
&
shutdown_cs
);
CloseThreadpoolCleanupGroupMembers
(
cleanup_group
,
TRUE
,
NULL
);
CloseThreadpoolCleanupGroup
(
cleanup_group
);
CloseHandle
(
exit_event
);
...
...
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