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
82f393dd
Commit
82f393dd
authored
Dec 29, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Move the LDT locking functions to the i386-specific code.
parent
f78890e8
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
37 deletions
+35
-37
signal_i386.c
dlls/ntdll/signal_i386.c
+35
-0
thread.c
dlls/ntdll/thread.c
+0
-37
No files found.
dlls/ntdll/signal_i386.c
View file @
82f393dd
...
...
@@ -2004,6 +2004,40 @@ int CDECL __wine_set_signal_handler(unsigned int sig, wine_signal_handler wsh)
}
/***********************************************************************
* locking for LDT routines
*/
static
RTL_CRITICAL_SECTION
ldt_section
;
static
RTL_CRITICAL_SECTION_DEBUG
critsect_debug
=
{
0
,
0
,
&
ldt_section
,
{
&
critsect_debug
.
ProcessLocksList
,
&
critsect_debug
.
ProcessLocksList
},
0
,
0
,
{
(
DWORD_PTR
)(
__FILE__
": ldt_section"
)
}
};
static
RTL_CRITICAL_SECTION
ldt_section
=
{
&
critsect_debug
,
-
1
,
0
,
0
,
0
,
0
};
static
sigset_t
ldt_sigset
;
static
void
ldt_lock
(
void
)
{
sigset_t
sigset
;
pthread_sigmask
(
SIG_BLOCK
,
&
server_block_set
,
&
sigset
);
RtlEnterCriticalSection
(
&
ldt_section
);
if
(
ldt_section
.
RecursionCount
==
1
)
ldt_sigset
=
sigset
;
}
static
void
ldt_unlock
(
void
)
{
if
(
ldt_section
.
RecursionCount
==
1
)
{
sigset_t
sigset
=
ldt_sigset
;
RtlLeaveCriticalSection
(
&
ldt_section
);
pthread_sigmask
(
SIG_SETMASK
,
&
sigset
,
NULL
);
}
else
RtlLeaveCriticalSection
(
&
ldt_section
);
}
/**********************************************************************
* signal_alloc_thread
*/
...
...
@@ -2146,6 +2180,7 @@ void signal_init_process(void)
if
(
sigaction
(
SIGUSR2
,
&
sig_act
,
NULL
)
==
-
1
)
goto
error
;
#endif
wine_ldt_init_locking
(
ldt_lock
,
ldt_unlock
);
return
;
error:
...
...
dlls/ntdll/thread.c
View file @
82f393dd
...
...
@@ -66,40 +66,6 @@ static RTL_BITMAP fls_bitmap;
static
LIST_ENTRY
tls_links
;
static
int
nb_threads
=
1
;
static
RTL_CRITICAL_SECTION
ldt_section
;
static
RTL_CRITICAL_SECTION_DEBUG
critsect_debug
=
{
0
,
0
,
&
ldt_section
,
{
&
critsect_debug
.
ProcessLocksList
,
&
critsect_debug
.
ProcessLocksList
},
0
,
0
,
{
(
DWORD_PTR
)(
__FILE__
": ldt_section"
)
}
};
static
RTL_CRITICAL_SECTION
ldt_section
=
{
&
critsect_debug
,
-
1
,
0
,
0
,
0
,
0
};
static
sigset_t
ldt_sigset
;
/***********************************************************************
* locking for LDT routines
*/
static
void
ldt_lock
(
void
)
{
sigset_t
sigset
;
pthread_sigmask
(
SIG_BLOCK
,
&
server_block_set
,
&
sigset
);
RtlEnterCriticalSection
(
&
ldt_section
);
if
(
ldt_section
.
RecursionCount
==
1
)
ldt_sigset
=
sigset
;
}
static
void
ldt_unlock
(
void
)
{
if
(
ldt_section
.
RecursionCount
==
1
)
{
sigset_t
sigset
=
ldt_sigset
;
RtlLeaveCriticalSection
(
&
ldt_section
);
pthread_sigmask
(
SIG_SETMASK
,
&
sigset
,
NULL
);
}
else
RtlLeaveCriticalSection
(
&
ldt_section
);
}
/***********************************************************************
* get_unicode_string
*
...
...
@@ -369,9 +335,6 @@ HANDLE thread_init(void)
wine_server_fd_to_handle
(
2
,
GENERIC_WRITE
|
SYNCHRONIZE
,
OBJ_INHERIT
,
&
params
.
hStdError
);
}
/* initialize LDT locking */
wine_ldt_init_locking
(
ldt_lock
,
ldt_unlock
);
/* initialize time values in user_shared_data */
NtQuerySystemTime
(
&
now
);
user_shared_data
->
SystemTime
.
LowPart
=
now
.
u
.
LowPart
;
...
...
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