Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
jacob-wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jacob Czekalla
jacob-wine
Commits
0d36c27e
Commit
0d36c27e
authored
13 years ago
by
Bernhard Loos
Committed by
Alexandre Julliard
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
server: ReleaseMutex doesn't need any access rights.
parent
7b63fa65
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dlls/kernel32/tests/sync.c
+3
-1
3 additions, 1 deletion
dlls/kernel32/tests/sync.c
server/mutex.c
+2
-2
2 additions, 2 deletions
server/mutex.c
with
5 additions
and
3 deletions
dlls/kernel32/tests/sync.c
+
3
−
1
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
;
}
}
...
...
This diff is collapsed.
Click to expand it.
server/mutex.c
+
2
−
2
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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment