Commit dbd67501 authored by Zebediah Figura's avatar Zebediah Figura Committed by Vitaly Lipatov

ntdll: Implement NtOpenMutant().

parent 5817c53f
......@@ -479,6 +479,14 @@ NTSTATUS esync_create_mutex( HANDLE *handle, ACCESS_MASK access,
return create_esync( ESYNC_MUTEX, handle, access, attr, initial ? 0 : 1, 0 );
}
NTSTATUS esync_open_mutex( HANDLE *handle, ACCESS_MASK access,
const OBJECT_ATTRIBUTES *attr )
{
TRACE("name %s.\n", debugstr_us(attr->ObjectName));
return open_esync( ESYNC_MUTEX, handle, access, attr );
}
NTSTATUS esync_release_mutex( HANDLE *handle, LONG *prev )
{
struct esync *obj;
......
......@@ -37,6 +37,8 @@ extern NTSTATUS esync_set_event( HANDLE handle ) DECLSPEC_HIDDEN;
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_release_mutex( HANDLE *handle, LONG *prev ) DECLSPEC_HIDDEN;
extern NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_any,
......
......@@ -594,6 +594,9 @@ NTSTATUS WINAPI NtOpenMutant( HANDLE *handle, ACCESS_MASK access, const OBJECT_A
*handle = 0;
if ((ret = validate_open_object_attributes( attr ))) return ret;
if (do_esync())
return esync_open_mutex( handle, access, attr );
SERVER_START_REQ( open_mutex )
{
req->access = access;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment