On 1/29/22 01:47, Jinoh Kang wrote:
diff --git a/dlls/ntdll/unix/sync.c b/dlls/ntdll/unix/sync.c index 442243d8bcf..4cb30479322 100644 --- a/dlls/ntdll/unix/sync.c +++ b/dlls/ntdll/unix/sync.c @@ -2510,3 +2510,25 @@ NTSTATUS WINAPI NtWaitForAlertByThreadId( const void *address, const LARGE_INTEG }
#endif
+/* Notify direct completion of async and close the wait handle if it is no longer needed.
- This function is a no-op (returns status as-is) if the supplied handle is NULL.
- */
+NTSTATUS notify_async( HANDLE *optional_handle, NTSTATUS status, ULONG_PTR information )
This function seems rather ambiguously named. Why not use the same name as for the server request?
+{
- NTSTATUS ret;
- if (!*optional_handle) return status;
- SERVER_START_REQ( notify_async_direct_result )
- {
req->handle = wine_server_obj_handle( *optional_handle );
req->status = status;
req->information = information;
ret = wine_server_call( req );
*optional_handle = wine_server_ptr_handle( reply->handle );
- }
- SERVER_END_REQ;
- return ret;
+}
...
diff --git a/server/protocol.def b/server/protocol.def index d79eca074a0..137e6c5a220 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -1456,6 +1456,7 @@ enum server_fd_type @REPLY obj_handle_t wait; /* handle to wait on for blocking recv */ unsigned int options; /* device open options */
- int may_restart; /* May restart async? */ @END
"may_restart" takes me a minute to realize what it actually means. Could we just return the (non)blocking flag directly instead?