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
b3158377
Commit
b3158377
authored
Aug 31, 2017
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Store the PEB lock pointer in the PEB.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
844b57e4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
11 deletions
+12
-11
rtl.c
dlls/ntdll/rtl.c
+2
-11
thread.c
dlls/ntdll/thread.c
+10
-0
No files found.
dlls/ntdll/rtl.c
View file @
b3158377
...
...
@@ -49,15 +49,6 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
ntdll
);
static
RTL_CRITICAL_SECTION
peb_lock
;
static
RTL_CRITICAL_SECTION_DEBUG
critsect_debug
=
{
0
,
0
,
&
peb_lock
,
{
&
critsect_debug
.
ProcessLocksList
,
&
critsect_debug
.
ProcessLocksList
},
0
,
0
,
{
(
DWORD_PTR
)(
__FILE__
": peb_lock"
)
}
};
static
RTL_CRITICAL_SECTION
peb_lock
=
{
&
critsect_debug
,
-
1
,
0
,
0
,
0
,
0
};
#ifdef __i386__
#define DEFINE_FASTCALL4_ENTRYPOINT( name ) \
__ASM_STDCALL_FUNC( name, 16, \
...
...
@@ -380,7 +371,7 @@ NTSTATUS WINAPI vDbgPrintExWithPrefix( LPCSTR prefix, ULONG id, ULONG level, LPC
*/
VOID
WINAPI
RtlAcquirePebLock
(
void
)
{
RtlEnterCriticalSection
(
&
peb_l
ock
);
RtlEnterCriticalSection
(
NtCurrentTeb
()
->
Peb
->
FastPebL
ock
);
}
/******************************************************************************
...
...
@@ -388,7 +379,7 @@ VOID WINAPI RtlAcquirePebLock(void)
*/
VOID
WINAPI
RtlReleasePebLock
(
void
)
{
RtlLeaveCriticalSection
(
&
peb_l
ock
);
RtlLeaveCriticalSection
(
NtCurrentTeb
()
->
Peb
->
FastPebL
ock
);
}
/******************************************************************************
...
...
dlls/ntdll/thread.c
View file @
b3158377
...
...
@@ -69,6 +69,15 @@ static RTL_BITMAP tls_expansion_bitmap;
static
RTL_BITMAP
fls_bitmap
;
static
int
nb_threads
=
1
;
static
RTL_CRITICAL_SECTION
peb_lock
;
static
RTL_CRITICAL_SECTION_DEBUG
critsect_debug
=
{
0
,
0
,
&
peb_lock
,
{
&
critsect_debug
.
ProcessLocksList
,
&
critsect_debug
.
ProcessLocksList
},
0
,
0
,
{
(
DWORD_PTR
)(
__FILE__
": peb_lock"
)
}
};
static
RTL_CRITICAL_SECTION
peb_lock
=
{
&
critsect_debug
,
-
1
,
0
,
0
,
0
,
0
};
/***********************************************************************
* get_unicode_string
*
...
...
@@ -292,6 +301,7 @@ HANDLE thread_init(void)
MEM_COMMIT
|
MEM_TOP_DOWN
,
PAGE_READWRITE
);
peb
=
addr
;
peb
->
FastPebLock
=
&
peb_lock
;
peb
->
ProcessParameters
=
&
params
;
peb
->
TlsBitmap
=
&
tls_bitmap
;
peb
->
TlsExpansionBitmap
=
&
tls_expansion_bitmap
;
...
...
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