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
5d929319
Commit
5d929319
authored
Dec 24, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Use a standard critical section instead of a syslevel for the USER lock.
parent
0d07420e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
user_main.c
dlls/user32/user_main.c
+11
-7
No files found.
dlls/user32/user_main.c
View file @
5d929319
...
...
@@ -39,14 +39,14 @@ WINE_DEFAULT_DEBUG_CHANNEL(graphics);
HMODULE
user32_module
=
0
;
static
SYSLEVEL
USER_SysLevel
;
static
CRITICAL_SECTION
user_section
;
static
CRITICAL_SECTION_DEBUG
critsect_debug
=
{
0
,
0
,
&
USER_SysLevel
.
crst
,
0
,
0
,
&
user_section
,
{
&
critsect_debug
.
ProcessLocksList
,
&
critsect_debug
.
ProcessLocksList
},
0
,
0
,
{
(
DWORD_PTR
)(
__FILE__
":
USER_SysLevel
"
)
}
0
,
0
,
{
(
DWORD_PTR
)(
__FILE__
":
user_section
"
)
}
};
static
SYSLEVEL
USER_SysLevel
=
{
{
&
critsect_debug
,
-
1
,
0
,
0
,
0
,
0
},
2
};
static
CRITICAL_SECTION
user_section
=
{
&
critsect_debug
,
-
1
,
0
,
0
,
0
,
0
};
static
HPALETTE
(
WINAPI
*
pfnGDISelectPalette
)(
HDC
hdc
,
HPALETTE
hpal
,
WORD
bkgnd
);
static
UINT
(
WINAPI
*
pfnGDIRealizePalette
)(
HDC
hdc
);
...
...
@@ -62,7 +62,7 @@ extern void WDML_NotifyThreadDetach(void);
*/
void
USER_Lock
(
void
)
{
_EnterSysLevel
(
&
USER_SysLevel
);
EnterCriticalSection
(
&
user_section
);
}
...
...
@@ -71,7 +71,7 @@ void USER_Lock(void)
*/
void
USER_Unlock
(
void
)
{
_LeaveSysLevel
(
&
USER_SysLevel
);
LeaveCriticalSection
(
&
user_section
);
}
...
...
@@ -82,7 +82,11 @@ void USER_Unlock(void)
*/
void
USER_CheckNotLock
(
void
)
{
_CheckNotSysLevel
(
&
USER_SysLevel
);
if
(
user_section
.
OwningThread
==
ULongToHandle
(
GetCurrentThreadId
())
&&
user_section
.
RecursionCount
)
{
ERR
(
"BUG: holding USER lock
\n
"
);
DebugBreak
();
}
}
...
...
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