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
36334a1b
Commit
36334a1b
authored
Feb 20, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Call pthread_sigmask directly instead of through the pthread function table.
parent
9e8016c3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
17 deletions
+14
-17
loader.c
dlls/ntdll/loader.c
+1
-4
server.c
dlls/ntdll/server.c
+7
-7
thread.c
dlls/ntdll/thread.c
+6
-6
No files found.
dlls/ntdll/loader.c
View file @
36334a1b
...
...
@@ -39,7 +39,6 @@
#include "wine/exception.h"
#include "wine/library.h"
#include "wine/pthread.h"
#include "wine/unicode.h"
#include "wine/debug.h"
#include "wine/server.h"
...
...
@@ -56,8 +55,6 @@ WINE_DECLARE_DEBUG_CHANNEL(imports);
#define RT_MANIFEST ((ULONG_PTR)24)
#define ISOLATIONAWARE_MANIFEST_RESOURCE_ID ((ULONG_PTR)2)
extern
struct
wine_pthread_functions
pthread_functions
;
typedef
DWORD
(
CALLBACK
*
DLLENTRYPROC
)(
HMODULE
,
DWORD
,
LPVOID
);
static
int
process_detaching
=
0
;
/* set on process detach to avoid deadlocks with thread detach */
...
...
@@ -2426,7 +2423,7 @@ static NTSTATUS attach_process_dlls( void *wm )
{
NTSTATUS
status
;
pthread_
functions
.
sigproc
mask
(
SIG_UNBLOCK
,
&
server_block_set
,
NULL
);
pthread_
sig
mask
(
SIG_UNBLOCK
,
&
server_block_set
,
NULL
);
RtlEnterCriticalSection
(
&
loader_section
);
if
((
status
=
process_attach
(
wm
,
(
LPVOID
)
1
))
!=
STATUS_SUCCESS
)
...
...
dlls/ntdll/server.c
View file @
36334a1b
...
...
@@ -163,7 +163,7 @@ void server_exit_thread( int status )
fds
[
1
]
=
ntdll_get_thread_data
()
->
wait_fd
[
1
];
fds
[
2
]
=
ntdll_get_thread_data
()
->
reply_fd
;
fds
[
3
]
=
ntdll_get_thread_data
()
->
request_fd
;
pthread_
functions
.
sigproc
mask
(
SIG_BLOCK
,
&
server_block_set
,
NULL
);
pthread_
sig
mask
(
SIG_BLOCK
,
&
server_block_set
,
NULL
);
info
.
stack_size
=
virtual_free_system_view
(
&
info
.
stack_base
);
info
.
teb_size
=
virtual_free_system_view
(
&
info
.
teb_base
);
...
...
@@ -181,7 +181,7 @@ void server_exit_thread( int status )
*/
void
server_abort_thread
(
int
status
)
{
pthread_
functions
.
sigproc
mask
(
SIG_BLOCK
,
&
server_block_set
,
NULL
);
pthread_
sig
mask
(
SIG_BLOCK
,
&
server_block_set
,
NULL
);
close
(
ntdll_get_thread_data
()
->
wait_fd
[
0
]
);
close
(
ntdll_get_thread_data
()
->
wait_fd
[
1
]
);
close
(
ntdll_get_thread_data
()
->
reply_fd
);
...
...
@@ -323,10 +323,10 @@ unsigned int wine_server_call( void *req_ptr )
sigset_t
old_set
;
unsigned
int
ret
;
pthread_
functions
.
sigproc
mask
(
SIG_BLOCK
,
&
server_block_set
,
&
old_set
);
pthread_
sig
mask
(
SIG_BLOCK
,
&
server_block_set
,
&
old_set
);
ret
=
send_request
(
req
);
if
(
!
ret
)
ret
=
wait_reply
(
req
);
pthread_
functions
.
sigproc
mask
(
SIG_SETMASK
,
&
old_set
,
NULL
);
pthread_
sig
mask
(
SIG_SETMASK
,
&
old_set
,
NULL
);
return
ret
;
}
...
...
@@ -336,7 +336,7 @@ unsigned int wine_server_call( void *req_ptr )
*/
void
server_enter_uninterrupted_section
(
RTL_CRITICAL_SECTION
*
cs
,
sigset_t
*
sigset
)
{
pthread_
functions
.
sigproc
mask
(
SIG_BLOCK
,
&
server_block_set
,
sigset
);
pthread_
sig
mask
(
SIG_BLOCK
,
&
server_block_set
,
sigset
);
RtlEnterCriticalSection
(
cs
);
}
...
...
@@ -347,7 +347,7 @@ void server_enter_uninterrupted_section( RTL_CRITICAL_SECTION *cs, sigset_t *sig
void
server_leave_uninterrupted_section
(
RTL_CRITICAL_SECTION
*
cs
,
sigset_t
*
sigset
)
{
RtlLeaveCriticalSection
(
cs
);
pthread_
functions
.
sigproc
mask
(
SIG_SETMASK
,
sigset
,
NULL
);
pthread_
sig
mask
(
SIG_SETMASK
,
sigset
,
NULL
);
}
...
...
@@ -985,7 +985,7 @@ void server_init_process(void)
sigaddset
(
&
server_block_set
,
SIGUSR1
);
sigaddset
(
&
server_block_set
,
SIGUSR2
);
sigaddset
(
&
server_block_set
,
SIGCHLD
);
pthread_
functions
.
sigproc
mask
(
SIG_BLOCK
,
&
server_block_set
,
NULL
);
pthread_
sig
mask
(
SIG_BLOCK
,
&
server_block_set
,
NULL
);
/* receive the first thread request fd on the main socket */
ntdll_get_thread_data
()
->
request_fd
=
receive_fd
(
&
version
);
...
...
dlls/ntdll/thread.c
View file @
36334a1b
...
...
@@ -88,7 +88,7 @@ static void ldt_lock(void)
{
sigset_t
sigset
;
pthread_
functions
.
sigproc
mask
(
SIG_BLOCK
,
&
server_block_set
,
&
sigset
);
pthread_
sig
mask
(
SIG_BLOCK
,
&
server_block_set
,
&
sigset
);
RtlEnterCriticalSection
(
&
ldt_section
);
if
(
ldt_section
.
RecursionCount
==
1
)
ldt_sigset
=
sigset
;
}
...
...
@@ -99,7 +99,7 @@ static void ldt_unlock(void)
{
sigset_t
sigset
=
ldt_sigset
;
RtlLeaveCriticalSection
(
&
ldt_section
);
pthread_
functions
.
sigproc
mask
(
SIG_SETMASK
,
&
sigset
,
NULL
);
pthread_
sig
mask
(
SIG_SETMASK
,
&
sigset
,
NULL
);
}
else
RtlLeaveCriticalSection
(
&
ldt_section
);
}
...
...
@@ -428,7 +428,7 @@ static void start_thread( struct wine_pthread_thread_info *info )
server_init_thread
(
func
);
pthread_functions
.
init_thread
(
info
);
virtual_alloc_thread_stack
(
info
->
stack_base
,
info
->
stack_size
);
pthread_
functions
.
sigproc
mask
(
SIG_UNBLOCK
,
&
server_block_set
,
NULL
);
pthread_
sig
mask
(
SIG_UNBLOCK
,
&
server_block_set
,
NULL
);
RtlAcquirePebLock
();
InsertHeadList
(
&
tls_links
,
&
teb
->
TlsLinks
);
...
...
@@ -524,7 +524,7 @@ NTSTATUS WINAPI RtlCreateUserThread( HANDLE process, const SECURITY_DESCRIPTOR *
return
status
;
}
pthread_
functions
.
sigproc
mask
(
SIG_BLOCK
,
&
server_block_set
,
&
sigset
);
pthread_
sig
mask
(
SIG_BLOCK
,
&
server_block_set
,
&
sigset
);
addr
=
NULL
;
size
=
sigstack_total_size
;
...
...
@@ -577,7 +577,7 @@ NTSTATUS WINAPI RtlCreateUserThread( HANDLE process, const SECURITY_DESCRIPTOR *
status
=
STATUS_NO_MEMORY
;
goto
error
;
}
pthread_
functions
.
sigproc
mask
(
SIG_SETMASK
,
&
sigset
,
NULL
);
pthread_
sig
mask
(
SIG_SETMASK
,
&
sigset
,
NULL
);
if
(
id
)
id
->
UniqueThread
=
ULongToHandle
(
tid
);
if
(
handle_ptr
)
*
handle_ptr
=
handle
;
...
...
@@ -593,7 +593,7 @@ error:
NtFreeVirtualMemory
(
NtCurrentProcess
(),
&
addr
,
&
size
,
MEM_RELEASE
);
}
if
(
handle
)
NtClose
(
handle
);
pthread_
functions
.
sigproc
mask
(
SIG_SETMASK
,
&
sigset
,
NULL
);
pthread_
sig
mask
(
SIG_SETMASK
,
&
sigset
,
NULL
);
close
(
request_pipe
[
1
]
);
return
status
;
}
...
...
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