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
d78bfe11
Commit
d78bfe11
authored
Nov 16, 2011
by
Francois Gouget
Committed by
Alexandre Julliard
Nov 16, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Statically initialize and name the MSVCRT_file_cs critical section.
parent
fb49b7fd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
file.c
dlls/msvcrt/file.c
+7
-3
No files found.
dlls/msvcrt/file.c
View file @
d78bfe11
...
...
@@ -128,6 +128,13 @@ static const ULONGLONG WCCOM = TOUL('c') << 32 | TOUL('o') << 16 | TOUL('m');
* protection, rather than locking the whole table for every change.
*/
static
CRITICAL_SECTION
MSVCRT_file_cs
;
static
CRITICAL_SECTION_DEBUG
MSVCRT_file_cs_debug
=
{
0
,
0
,
&
MSVCRT_file_cs
,
{
&
MSVCRT_file_cs_debug
.
ProcessLocksList
,
&
MSVCRT_file_cs_debug
.
ProcessLocksList
},
0
,
0
,
{
(
DWORD_PTR
)(
__FILE__
": MSVCRT_file_cs"
)
}
};
static
CRITICAL_SECTION
MSVCRT_file_cs
=
{
&
MSVCRT_file_cs_debug
,
-
1
,
0
,
0
,
0
,
0
};
#define LOCK_FILES() do { EnterCriticalSection(&MSVCRT_file_cs); } while (0)
#define UNLOCK_FILES() do { LeaveCriticalSection(&MSVCRT_file_cs); } while (0)
...
...
@@ -440,8 +447,6 @@ void msvcrt_init_io(void)
int
i
;
ioinfo
*
fdinfo
;
InitializeCriticalSection
(
&
MSVCRT_file_cs
);
MSVCRT_file_cs
.
DebugInfo
->
Spare
[
0
]
=
(
DWORD_PTR
)(
__FILE__
": MSVCRT_file_cs"
);
GetStartupInfoA
(
&
si
);
if
(
si
.
cbReserved2
>=
sizeof
(
unsigned
int
)
&&
si
.
lpReserved2
!=
NULL
)
{
...
...
@@ -983,7 +988,6 @@ void msvcrt_free_io(void)
for
(
i
=
0
;
i
<
sizeof
(
MSVCRT_fstream
)
/
sizeof
(
MSVCRT_fstream
[
0
]);
i
++
)
MSVCRT_free
(
MSVCRT_fstream
[
i
]);
MSVCRT_file_cs
.
DebugInfo
->
Spare
[
0
]
=
0
;
DeleteCriticalSection
(
&
MSVCRT_file_cs
);
}
...
...
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