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
9c8dce21
Commit
9c8dce21
authored
Sep 22, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Don't lock mutexes during process exit.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d8f7d545
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
5 deletions
+6
-5
process.c
dlls/ntdll/unix/process.c
+2
-3
server.c
dlls/ntdll/unix/server.c
+1
-0
unix_private.h
dlls/ntdll/unix/unix_private.h
+3
-2
No files found.
dlls/ntdll/unix/process.c
View file @
9c8dce21
...
...
@@ -1042,7 +1042,6 @@ done:
*/
NTSTATUS
WINAPI
NtTerminateProcess
(
HANDLE
handle
,
LONG
exit_code
)
{
static
BOOL
clean_exit
;
NTSTATUS
ret
;
BOOL
self
;
...
...
@@ -1056,8 +1055,8 @@ NTSTATUS WINAPI NtTerminateProcess( HANDLE handle, LONG exit_code )
SERVER_END_REQ
;
if
(
self
)
{
if
(
!
handle
)
clean_exit
=
TRUE
;
else
if
(
clean_exit
)
exit_process
(
exit_code
);
if
(
!
handle
)
process_exiting
=
TRUE
;
else
if
(
process_exiting
)
exit_process
(
exit_code
);
else
abort_process
(
exit_code
);
}
return
ret
;
...
...
dlls/ntdll/unix/server.c
View file @
9c8dce21
...
...
@@ -105,6 +105,7 @@ static const char *server_dir;
unsigned
int
server_cpus
=
0
;
BOOL
is_wow64
=
FALSE
;
BOOL
process_exiting
=
FALSE
;
timeout_t
server_start_time
=
0
;
/* time of server startup */
...
...
dlls/ntdll/unix/unix_private.h
View file @
9c8dce21
...
...
@@ -132,6 +132,7 @@ extern char **main_envp DECLSPEC_HIDDEN;
extern
WCHAR
**
main_wargv
DECLSPEC_HIDDEN
;
extern
unsigned
int
server_cpus
DECLSPEC_HIDDEN
;
extern
BOOL
is_wow64
DECLSPEC_HIDDEN
;
extern
BOOL
process_exiting
DECLSPEC_HIDDEN
;
extern
HANDLE
keyed_event
DECLSPEC_HIDDEN
;
extern
timeout_t
server_start_time
DECLSPEC_HIDDEN
;
extern
sigset_t
server_block_set
DECLSPEC_HIDDEN
;
...
...
@@ -280,12 +281,12 @@ static inline void *get_signal_stack(void)
static
inline
void
mutex_lock
(
pthread_mutex_t
*
mutex
)
{
pthread_mutex_lock
(
mutex
);
if
(
!
process_exiting
)
pthread_mutex_lock
(
mutex
);
}
static
inline
void
mutex_unlock
(
pthread_mutex_t
*
mutex
)
{
pthread_mutex_unlock
(
mutex
);
if
(
!
process_exiting
)
pthread_mutex_unlock
(
mutex
);
}
#ifndef _WIN64
...
...
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