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
527a985a
Commit
527a985a
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: Correct mapping of mutex access rights.
parent
0d36c27e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
sync.c
dlls/kernel32/tests/sync.c
+2
-2
mutex.c
server/mutex.c
+3
-3
No files found.
dlls/kernel32/tests/sync.c
View file @
527a985a
...
@@ -140,7 +140,7 @@ static void test_mutex(void)
...
@@ -140,7 +140,7 @@ static void test_mutex(void)
hOpened
=
OpenMutex
(
GENERIC_EXECUTE
,
FALSE
,
"WineTestMutex"
);
hOpened
=
OpenMutex
(
GENERIC_EXECUTE
,
FALSE
,
"WineTestMutex"
);
ok
(
hOpened
!=
NULL
,
"OpenMutex failed with error %d
\n
"
,
GetLastError
());
ok
(
hOpened
!=
NULL
,
"OpenMutex failed with error %d
\n
"
,
GetLastError
());
wait_ret
=
WaitForSingleObject
(
hOpened
,
INFINITE
);
wait_ret
=
WaitForSingleObject
(
hOpened
,
INFINITE
);
todo_wine
ok
(
wait_ret
==
WAIT_OBJECT_0
,
"WaitForSingleObject failed with error %d
\n
"
,
GetLastError
());
ok
(
wait_ret
==
WAIT_OBJECT_0
,
"WaitForSingleObject failed with error %d
\n
"
,
GetLastError
());
CloseHandle
(
hOpened
);
CloseHandle
(
hOpened
);
for
(
i
=
0
;
i
<
31
;
i
++
)
for
(
i
=
0
;
i
<
31
;
i
++
)
...
@@ -152,7 +152,7 @@ static void test_mutex(void)
...
@@ -152,7 +152,7 @@ static void test_mutex(void)
hOpened
=
OpenMutex
(
GENERIC_READ
|
GENERIC_WRITE
,
FALSE
,
"WineTestMutex"
);
hOpened
=
OpenMutex
(
GENERIC_READ
|
GENERIC_WRITE
,
FALSE
,
"WineTestMutex"
);
ok
(
hOpened
!=
NULL
,
"OpenMutex failed with error %d
\n
"
,
GetLastError
());
ok
(
hOpened
!=
NULL
,
"OpenMutex failed with error %d
\n
"
,
GetLastError
());
wait_ret
=
WaitForSingleObject
(
hOpened
,
INFINITE
);
wait_ret
=
WaitForSingleObject
(
hOpened
,
INFINITE
);
todo_wine
ok
(
wait_ret
==
WAIT_FAILED
,
"WaitForSingleObject succeeded
\n
"
);
ok
(
wait_ret
==
WAIT_FAILED
,
"WaitForSingleObject succeeded
\n
"
);
CloseHandle
(
hOpened
);
CloseHandle
(
hOpened
);
for
(
i
=
0
;
i
<
32
;
i
++
)
for
(
i
=
0
;
i
<
32
;
i
++
)
...
...
server/mutex.c
View file @
527a985a
...
@@ -163,9 +163,9 @@ static int mutex_satisfied( struct object *obj, struct thread *thread )
...
@@ -163,9 +163,9 @@ static int mutex_satisfied( struct object *obj, struct thread *thread )
static
unsigned
int
mutex_map_access
(
struct
object
*
obj
,
unsigned
int
access
)
static
unsigned
int
mutex_map_access
(
struct
object
*
obj
,
unsigned
int
access
)
{
{
if
(
access
&
GENERIC_READ
)
access
|=
STANDARD_RIGHTS_READ
|
SYNCHRONIZE
;
if
(
access
&
GENERIC_READ
)
access
|=
STANDARD_RIGHTS_READ
;
if
(
access
&
GENERIC_WRITE
)
access
|=
STANDARD_RIGHTS_WRITE
|
MUTEX_MODIFY_STATE
;
if
(
access
&
GENERIC_WRITE
)
access
|=
STANDARD_RIGHTS_WRITE
;
if
(
access
&
GENERIC_EXECUTE
)
access
|=
STANDARD_RIGHTS_EXECUTE
;
if
(
access
&
GENERIC_EXECUTE
)
access
|=
STANDARD_RIGHTS_EXECUTE
|
SYNCHRONIZE
;
if
(
access
&
GENERIC_ALL
)
access
|=
STANDARD_RIGHTS_ALL
|
MUTEX_ALL_ACCESS
;
if
(
access
&
GENERIC_ALL
)
access
|=
STANDARD_RIGHTS_ALL
|
MUTEX_ALL_ACCESS
;
return
access
&
~
(
GENERIC_READ
|
GENERIC_WRITE
|
GENERIC_EXECUTE
|
GENERIC_ALL
);
return
access
&
~
(
GENERIC_READ
|
GENERIC_WRITE
|
GENERIC_EXECUTE
|
GENERIC_ALL
);
}
}
...
...
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