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
301df6b5
Commit
301df6b5
authored
Aug 16, 2001
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added names to standard critical sections (suggested by Andreas
Mohr).
parent
06abe790
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
23 additions
and
18 deletions
+23
-18
critsection.c
dlls/ntdll/critsection.c
+7
-2
rtl.c
dlls/ntdll/rtl.c
+1
-1
changenotify.c
dlls/shell32/changenotify.c
+1
-1
iconcache.c
dlls/shell32/iconcache.c
+1
-1
misc.c
dlls/user/dde/misc.c
+1
-1
winaspi32.c
dlls/winaspi/winaspi32.c
+1
-1
async.c
dlls/winsock/async.c
+1
-1
x11drv_main.c
dlls/x11drv/x11drv_main.c
+1
-1
profile.c
files/profile.c
+1
-1
xfont.c
graphics/x11drv/xfont.c
+1
-1
winbase.h
include/winbase.h
+1
-1
virtual.c
memory/virtual.c
+1
-1
gdiobj.c
objects/gdiobj.c
+1
-1
pthread.c
scheduler/pthread.c
+1
-1
syslevel.c
scheduler/syslevel.c
+1
-1
cursoricon.c
windows/cursoricon.c
+1
-1
timer.c
windows/timer.c
+1
-1
No files found.
dlls/ntdll/critsection.c
View file @
301df6b5
...
...
@@ -141,6 +141,7 @@ static inline HANDLE get_semaphore( RTL_CRITICAL_SECTION *crit )
*/
NTSTATUS
WINAPI
RtlInitializeCriticalSection
(
RTL_CRITICAL_SECTION
*
crit
)
{
crit
->
DebugInfo
=
NULL
;
crit
->
LockCount
=
-
1
;
crit
->
RecursionCount
=
0
;
crit
->
OwningThread
=
0
;
...
...
@@ -190,11 +191,15 @@ NTSTATUS WINAPI RtlpWaitForCriticalSection( RTL_CRITICAL_SECTION *crit )
DWORD
res
=
WaitForSingleObject
(
sem
,
5000L
);
if
(
res
==
WAIT_TIMEOUT
)
{
ERR
(
"Critical section %p wait timed out, retrying (60 sec) fs=%04x
\n
"
,
crit
,
__get_fs
()
);
const
char
*
name
=
(
char
*
)
crit
->
DebugInfo
;
if
(
!
name
||
IsBadStringPtrA
(
name
,
80
))
name
=
"?"
;
ERR
(
"section %p %s wait timed out, retrying (60 sec) fs=%04x
\n
"
,
crit
,
debugstr_a
(
name
),
__get_fs
()
);
res
=
WaitForSingleObject
(
sem
,
60000L
);
if
(
res
==
WAIT_TIMEOUT
&&
TRACE_ON
(
relay
)
)
{
ERR
(
"Critical section %p wait timed out, retrying (5 min) fs=%04x
\n
"
,
crit
,
__get_fs
()
);
ERR
(
"section %p %s wait timed out, retrying (5 min) fs=%04x
\n
"
,
crit
,
debugstr_a
(
name
),
__get_fs
()
);
res
=
WaitForSingleObject
(
sem
,
300000L
);
}
}
...
...
dlls/ntdll/rtl.c
View file @
301df6b5
...
...
@@ -21,7 +21,7 @@
DEFAULT_DEBUG_CHANNEL
(
ntdll
);
static
RTL_CRITICAL_SECTION
peb_lock
=
CRITICAL_SECTION_INIT
;
static
RTL_CRITICAL_SECTION
peb_lock
=
CRITICAL_SECTION_INIT
(
"peb_lock"
)
;
/*
* resource functions
...
...
dlls/shell32/changenotify.c
View file @
301df6b5
...
...
@@ -14,7 +14,7 @@
DEFAULT_DEBUG_CHANNEL
(
shell
);
static
CRITICAL_SECTION
SHELL32_ChangenotifyCS
=
CRITICAL_SECTION_INIT
;
static
CRITICAL_SECTION
SHELL32_ChangenotifyCS
=
CRITICAL_SECTION_INIT
(
"SHELL32_ChangenotifyCS"
)
;
/* internal list of notification clients (internal) */
typedef
struct
_NOTIFICATIONLIST
...
...
dlls/shell32/iconcache.c
View file @
301df6b5
...
...
@@ -37,7 +37,7 @@ typedef struct
}
SIC_ENTRY
,
*
LPSIC_ENTRY
;
static
HDPA
sic_hdpa
=
0
;
static
CRITICAL_SECTION
SHELL32_SicCS
=
CRITICAL_SECTION_INIT
;
static
CRITICAL_SECTION
SHELL32_SicCS
=
CRITICAL_SECTION_INIT
(
"SHELL32_SicCS"
)
;
/*****************************************************************************
* SIC_CompareEntrys [called by comctl32.dll]
...
...
dlls/user/dde/misc.c
View file @
301df6b5
...
...
@@ -27,7 +27,7 @@ DEFAULT_DEBUG_CHANNEL(ddeml);
static
WDML_INSTANCE
*
WDML_InstanceList
=
NULL
;
static
DWORD
WDML_MaxInstanceID
=
0
;
/* OK for present, have to worry about wrap-around later */
const
char
WDML_szEventClass
[]
=
"DdeEventClass"
;
CRITICAL_SECTION
WDML_CritSect
=
CRITICAL_SECTION_INIT
;
CRITICAL_SECTION
WDML_CritSect
=
CRITICAL_SECTION_INIT
(
"WDML_CritSect"
)
;
/* ================================================================
*
...
...
dlls/winaspi/winaspi32.c
View file @
301df6b5
...
...
@@ -30,7 +30,7 @@ DEFAULT_DEBUG_CHANNEL(aspi);
#ifdef linux
static
ASPI_DEVICE_INFO
*
ASPI_open_devices
=
NULL
;
static
CRITICAL_SECTION
ASPI_CritSection
=
CRITICAL_SECTION_INIT
;
static
CRITICAL_SECTION
ASPI_CritSection
=
CRITICAL_SECTION_INIT
(
"ASPI_CritSection"
)
;
#endif
/* defined(linux) */
...
...
dlls/winsock/async.c
View file @
301df6b5
...
...
@@ -91,7 +91,7 @@ DEFAULT_DEBUG_CHANNEL(winsock);
/* critical section to protect some non-rentrant net function */
CRITICAL_SECTION
csWSgetXXXbyYYY
=
CRITICAL_SECTION_INIT
;
CRITICAL_SECTION
csWSgetXXXbyYYY
=
CRITICAL_SECTION_INIT
(
"csWSgetXXXbyYYY"
)
;
/* protoptypes of some functions in socket.c
*/
...
...
dlls/x11drv/x11drv_main.c
View file @
301df6b5
...
...
@@ -47,7 +47,7 @@ DEFAULT_DEBUG_CHANNEL(x11drv);
static
void
(
*
old_tsx11_lock
)(
void
);
static
void
(
*
old_tsx11_unlock
)(
void
);
static
CRITICAL_SECTION
X11DRV_CritSection
=
CRITICAL_SECTION_INIT
;
static
CRITICAL_SECTION
X11DRV_CritSection
=
CRITICAL_SECTION_INIT
(
"X11DRV_CritSection"
)
;
Screen
*
screen
;
Visual
*
visual
;
...
...
files/profile.c
View file @
301df6b5
...
...
@@ -79,7 +79,7 @@ static char PROFILE_WineIniUsed[MAX_PATHNAME_LEN] = "";
static
const
WCHAR
wininiW
[]
=
{
'w'
,
'i'
,
'n'
,
'.'
,
'i'
,
'n'
,
'i'
,
0
};
static
CRITICAL_SECTION
PROFILE_CritSect
=
CRITICAL_SECTION_INIT
;
static
CRITICAL_SECTION
PROFILE_CritSect
=
CRITICAL_SECTION_INIT
(
"PROFILE_CritSect"
)
;
static
const
char
hex
[
16
]
=
"0123456789ABCDEF"
;
...
...
graphics/x11drv/xfont.c
View file @
301df6b5
...
...
@@ -306,7 +306,7 @@ static const struct CharsetBindingInfo charsetbindings[] =
static
int
DefResolution
=
0
;
static
CRITICAL_SECTION
crtsc_fonts_X11
=
CRITICAL_SECTION_INIT
;
static
CRITICAL_SECTION
crtsc_fonts_X11
=
CRITICAL_SECTION_INIT
(
"crtsc_fonts_X11"
)
;
static
fontResource
*
fontList
=
NULL
;
static
fontObject
*
fontCache
=
NULL
;
/* array */
...
...
include/winbase.h
View file @
301df6b5
...
...
@@ -986,7 +986,7 @@ typedef DWORD CALLBACK (*LPPROGRESS_ROUTINE)(LARGE_INTEGER, LARGE_INTEGER, LARGE
#define FORMAT_MESSAGE_MAX_WIDTH_MASK 0x000000FF
#ifdef __WINE__
#define CRITICAL_SECTION_INIT
{ 0
, -1, 0, 0, 0, 0 }
#define CRITICAL_SECTION_INIT
(name) { (void *)(__FILE__ ": " name)
, -1, 0, 0, 0, 0 }
#endif
typedef
struct
{
...
...
memory/virtual.c
View file @
301df6b5
...
...
@@ -81,7 +81,7 @@ static const BYTE VIRTUAL_Win32Flags[16] =
static
FILE_VIEW
*
VIRTUAL_FirstView
;
static
CRITICAL_SECTION
csVirtual
=
CRITICAL_SECTION_INIT
;
static
CRITICAL_SECTION
csVirtual
=
CRITICAL_SECTION_INIT
(
"csVirtual"
)
;
#ifdef __i386__
/* These are always the same on an i386, and it will be faster this way */
...
...
objects/gdiobj.c
View file @
301df6b5
...
...
@@ -170,7 +170,7 @@ static GDIOBJHDR * StockObjects[NB_STOCK_OBJECTS] =
HBITMAP
hPseudoStockBitmap
;
/* 1x1 bitmap for memory DCs */
static
SYSLEVEL
GDI_level
=
{
CRITICAL_SECTION_INIT
,
3
};
static
SYSLEVEL
GDI_level
=
{
CRITICAL_SECTION_INIT
(
"GDI_level"
)
,
3
};
static
WORD
GDI_HeapSel
;
static
BOOL
get_bool
(
char
*
buffer
,
BOOL
def_value
)
...
...
scheduler/pthread.c
View file @
301df6b5
...
...
@@ -121,7 +121,7 @@ strong_alias(__pthread_kill_other_threads_np, pthread_kill_other_threads_np);
#define MAX_ATFORK 8
/* libc doesn't need that many anyway */
static
CRITICAL_SECTION
atfork_section
=
CRITICAL_SECTION_INIT
;
static
CRITICAL_SECTION
atfork_section
=
CRITICAL_SECTION_INIT
(
"atfork_section"
)
;
typedef
void
(
*
atfork_handler
)();
static
atfork_handler
atfork_prepare
[
MAX_ATFORK
];
static
atfork_handler
atfork_parent
[
MAX_ATFORK
];
...
...
scheduler/syslevel.c
View file @
301df6b5
...
...
@@ -14,7 +14,7 @@
DEFAULT_DEBUG_CHANNEL
(
win32
);
static
SYSLEVEL
Win16Mutex
=
{
CRITICAL_SECTION_INIT
,
1
};
static
SYSLEVEL
Win16Mutex
=
{
CRITICAL_SECTION_INIT
(
"Win16Mutex"
)
,
1
};
/* Global variable to save current TEB while in 16-bit code */
WORD
SYSLEVEL_Win16CurrentTeb
=
0
;
...
...
windows/cursoricon.c
View file @
301df6b5
...
...
@@ -78,7 +78,7 @@ typedef struct tagICONCACHE
}
ICONCACHE
;
static
ICONCACHE
*
IconAnchor
=
NULL
;
static
CRITICAL_SECTION
IconCrst
=
CRITICAL_SECTION_INIT
;
static
CRITICAL_SECTION
IconCrst
=
CRITICAL_SECTION_INIT
(
"IconCrst"
)
;
static
WORD
ICON_HOTSPOT
=
0x4242
;
...
...
windows/timer.c
View file @
301df6b5
...
...
@@ -35,7 +35,7 @@ typedef struct tagTIMER
static
TIMER
TimersArray
[
NB_TIMERS
];
static
CRITICAL_SECTION
csTimer
=
CRITICAL_SECTION_INIT
;
static
CRITICAL_SECTION
csTimer
=
CRITICAL_SECTION_INIT
(
"csTimer"
)
;
/***********************************************************************
...
...
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