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
0d36c27e
Commit
0d36c27e
authored
Sep 14, 2011
by
Bernhard Loos
Committed by
Alexandre Julliard
Sep 23, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: ReleaseMutex doesn't need any access rights.
parent
7b63fa65
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
sync.c
dlls/kernel32/tests/sync.c
+3
-1
mutex.c
server/mutex.c
+2
-2
No files found.
dlls/kernel32/tests/sync.c
View file @
0d36c27e
...
...
@@ -158,13 +158,15 @@ static void test_mutex(void)
for
(
i
=
0
;
i
<
32
;
i
++
)
{
hOpened
=
OpenMutex
(
0x1
<<
i
,
FALSE
,
"WineTestMutex"
);
ReleaseMutex
(
hCreated
);
if
(
hOpened
!=
NULL
)
{
ret
=
ReleaseMutex
(
hOpened
);
ok
(
ret
,
"ReleaseMutex failed with error %d, access %x
\n
"
,
GetLastError
(),
1
<<
i
);
CloseHandle
(
hOpened
);
}
else
{
ReleaseMutex
(
hCreated
);
failed
|=
0x1
<<
i
;
}
}
...
...
server/mutex.c
View file @
0d36c27e
...
...
@@ -175,7 +175,7 @@ static int mutex_signal( struct object *obj, unsigned int access )
struct
mutex
*
mutex
=
(
struct
mutex
*
)
obj
;
assert
(
obj
->
ops
==
&
mutex_ops
);
if
(
!
(
access
&
SYNCHRONIZE
))
/* FIXME: MUTEX_MODIFY_STATE? */
if
(
!
(
access
&
SYNCHRONIZE
))
{
set_error
(
STATUS_ACCESS_DENIED
);
return
0
;
...
...
@@ -265,7 +265,7 @@ DECL_HANDLER(release_mutex)
struct
mutex
*
mutex
;
if
((
mutex
=
(
struct
mutex
*
)
get_handle_obj
(
current
->
process
,
req
->
handle
,
MUTEX_MODIFY_STATE
,
&
mutex_ops
)))
0
,
&
mutex_ops
)))
{
if
(
!
mutex
->
count
||
(
mutex
->
owner
!=
current
))
set_error
(
STATUS_MUTANT_NOT_OWNED
);
else
...
...
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