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
d0451f6b
Commit
d0451f6b
authored
Oct 12, 2011
by
Alexander Morozov
Committed by
Alexandre Julliard
Oct 12, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Fix overlapping shared and exclusive locks support.
parent
db6fe9ee
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
file.c
dlls/kernel32/tests/file.c
+0
-1
fd.c
server/fd.c
+4
-4
No files found.
dlls/kernel32/tests/file.c
View file @
d0451f6b
...
...
@@ -1671,7 +1671,6 @@ static void test_LockFile(void)
ok
(
!
LockFileEx
(
handle2
,
LOCKFILE_FAIL_IMMEDIATELY
,
0
,
100
,
0
,
&
overlapped
),
"LockFileEx handle2 300,100 succeeded
\n
"
);
ret
=
LockFileEx
(
handle
,
LOCKFILE_FAIL_IMMEDIATELY
,
0
,
100
,
0
,
&
overlapped
);
todo_wine
ok
(
ret
,
"LockFileEx 300,100 failed
\n
"
);
ok
(
UnlockFileEx
(
handle
,
0
,
100
,
0
,
&
overlapped
),
"UnlockFileEx 300,100 failed
\n
"
);
/* exclusive lock is removed first */
...
...
server/fd.c
View file @
d0451f6b
...
...
@@ -1321,9 +1321,9 @@ static struct file_lock *add_lock( struct fd *fd, int shared, file_pos_t start,
release_object
(
lock
);
return
NULL
;
}
list_add_
head
(
&
fd
->
locks
,
&
lock
->
fd_entry
);
list_add_
head
(
&
fd
->
inode
->
locks
,
&
lock
->
inode_entry
);
list_add_
head
(
&
lock
->
process
->
locks
,
&
lock
->
proc_entry
);
list_add_
tail
(
&
fd
->
locks
,
&
lock
->
fd_entry
);
list_add_
tail
(
&
fd
->
inode
->
locks
,
&
lock
->
inode_entry
);
list_add_
tail
(
&
lock
->
process
->
locks
,
&
lock
->
proc_entry
);
return
lock
;
}
...
...
@@ -1395,7 +1395,7 @@ obj_handle_t lock_fd( struct fd *fd, file_pos_t start, file_pos_t count, int sha
{
struct
file_lock
*
lock
=
LIST_ENTRY
(
ptr
,
struct
file_lock
,
inode_entry
);
if
(
!
lock_overlaps
(
lock
,
start
,
end
))
continue
;
if
(
lock
->
shared
&&
shared
)
continue
;
if
(
shared
&&
(
lock
->
shared
||
lock
->
fd
==
fd
)
)
continue
;
/* found one */
if
(
!
wait
)
{
...
...
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