Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
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
Aleksandr Isakov
wine-fonts
Commits
26148c41
Commit
26148c41
authored
Jul 06, 2020
by
Zebediah Figura
Committed by
Vitaly Lipatov
Jul 30, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Implement NtQueryMutant().
parent
f7072c8b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
0 deletions
+24
-0
esync.c
dlls/ntdll/unix/esync.c
+20
-0
esync.h
dlls/ntdll/unix/esync.h
+1
-0
sync.c
dlls/ntdll/unix/sync.c
+3
-0
No files found.
dlls/ntdll/unix/esync.c
View file @
26148c41
...
...
@@ -560,6 +560,26 @@ NTSTATUS esync_release_mutex( HANDLE *handle, LONG *prev )
return
STATUS_SUCCESS
;
}
NTSTATUS
esync_query_mutex
(
HANDLE
handle
,
void
*
info
,
ULONG
*
ret_len
)
{
struct
esync
*
obj
;
struct
mutex
*
mutex
;
MUTANT_BASIC_INFORMATION
*
out
=
info
;
NTSTATUS
ret
;
TRACE
(
"handle %p, info %p, ret_len %p.
\n
"
,
handle
,
info
,
ret_len
);
if
((
ret
=
get_object
(
handle
,
&
obj
)))
return
ret
;
mutex
=
obj
->
shm
;
out
->
CurrentCount
=
1
-
mutex
->
count
;
out
->
OwnedByCaller
=
(
mutex
->
tid
==
GetCurrentThreadId
());
out
->
AbandonedState
=
FALSE
;
if
(
ret_len
)
*
ret_len
=
sizeof
(
*
out
);
return
STATUS_SUCCESS
;
}
#define TICKSPERSEC 10000000
#define TICKSPERMSEC 10000
...
...
dlls/ntdll/unix/esync.h
View file @
26148c41
...
...
@@ -41,6 +41,7 @@ extern NTSTATUS esync_create_mutex( HANDLE *handle, ACCESS_MASK access,
const
OBJECT_ATTRIBUTES
*
attr
,
BOOLEAN
initial
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
esync_open_mutex
(
HANDLE
*
handle
,
ACCESS_MASK
access
,
const
OBJECT_ATTRIBUTES
*
attr
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
esync_query_mutex
(
HANDLE
handle
,
void
*
info
,
ULONG
*
ret_len
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
esync_release_mutex
(
HANDLE
*
handle
,
LONG
*
prev
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
esync_wait_objects
(
DWORD
count
,
const
HANDLE
*
handles
,
BOOLEAN
wait_any
,
...
...
dlls/ntdll/unix/sync.c
View file @
26148c41
...
...
@@ -658,6 +658,9 @@ NTSTATUS WINAPI NtQueryMutant( HANDLE handle, MUTANT_INFORMATION_CLASS class,
if
(
len
!=
sizeof
(
MUTANT_BASIC_INFORMATION
))
return
STATUS_INFO_LENGTH_MISMATCH
;
if
(
do_esync
())
return
esync_query_mutex
(
handle
,
info
,
ret_len
);
SERVER_START_REQ
(
query_mutex
)
{
req
->
handle
=
wine_server_obj_handle
(
handle
);
...
...
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