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
249917be
Commit
249917be
authored
May 19, 2011
by
Piotr Caban
Committed by
Alexandre Julliard
May 19, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Added _lock_file/_unlock_file implementation.
parent
2ca229de
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
file.c
dlls/msvcrt/file.c
+13
-2
No files found.
dlls/msvcrt/file.c
View file @
249917be
...
...
@@ -380,6 +380,9 @@ static int msvcrt_init_fp(MSVCRT_FILE* file, int fd, unsigned stream_flags)
file
->
_file
=
fd
;
file
->
_flag
=
stream_flags
;
if
(
file
<
MSVCRT__iob
||
file
>=
MSVCRT__iob
+
_IOB_ENTRIES
)
InitializeCriticalSection
(
&
((
file_crit
*
)
file
)
->
crit
);
TRACE
(
":got FILE* (%p)
\n
"
,
file
);
return
0
;
}
...
...
@@ -1034,7 +1037,10 @@ LONG CDECL MSVCRT__lseek(int fd, LONG offset, int whence)
*/
void
CDECL
MSVCRT__lock_file
(
MSVCRT_FILE
*
file
)
{
FIXME
(
"(%p) stub
\n
"
,
file
);
if
(
file
>=
MSVCRT__iob
&&
file
<
MSVCRT__iob
+
_IOB_ENTRIES
)
_lock
(
_STREAM_LOCKS
+
(
file
-
MSVCRT__iob
));
else
EnterCriticalSection
(
&
((
file_crit
*
)
file
)
->
crit
);
}
/*********************************************************************
...
...
@@ -1042,7 +1048,10 @@ void CDECL MSVCRT__lock_file(MSVCRT_FILE *file)
*/
void
CDECL
MSVCRT__unlock_file
(
MSVCRT_FILE
*
file
)
{
FIXME
(
"(%p) stub
\n
"
,
file
);
if
(
file
>=
MSVCRT__iob
&&
file
<
MSVCRT__iob
+
_IOB_ENTRIES
)
_unlock
(
_STREAM_LOCKS
+
(
file
-
MSVCRT__iob
));
else
LeaveCriticalSection
(
&
((
file_crit
*
)
file
)
->
crit
);
}
/*********************************************************************
...
...
@@ -2555,6 +2564,8 @@ int CDECL MSVCRT_fclose(MSVCRT_FILE* file)
r
=
MSVCRT__close
(
file
->
_file
);
file
->
_flag
=
0
;
if
(
file
<
MSVCRT__iob
||
file
>=
MSVCRT__iob
+
_IOB_ENTRIES
)
DeleteCriticalSection
(
&
((
file_crit
*
)
file
)
->
crit
);
if
(
file
==
msvcrt_get_file
(
MSVCRT_stream_idx
-
1
))
{
while
(
MSVCRT_stream_idx
>
3
&&
!
file
->
_flag
)
{
...
...
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