Macros | Functions
req-inl.h File Reference
#include <assert.h>
#include "uv.h"
#include "internal.h"
Include dependency graph for req-inl.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define DELEGATE_STREAM_REQ(loop, req, method, handle_at)
 
#define GET_REQ_ERROR(req)   (pRtlNtStatusToDosError(GET_REQ_STATUS((req))))
 
#define GET_REQ_SOCK_ERROR(req)   (uv_ntstatus_to_winsock_error(GET_REQ_STATUS((req))))
 
#define GET_REQ_STATUS(req)   ((NTSTATUS) (req)->u.io.overlapped.Internal)
 
#define POST_COMPLETION_FOR_REQ(loop, req)
 
#define REGISTER_HANDLE_REQ(loop, handle, req)
 
#define REQ_SUCCESS(req)   (NT_SUCCESS(GET_REQ_STATUS((req))))
 
#define SET_REQ_ERROR(req, error)   SET_REQ_STATUS((req), NTSTATUS_FROM_WIN32((error)))
 
#define SET_REQ_STATUS(req, status)   (req)->u.io.overlapped.Internal = (ULONG_PTR) (status)
 
#define SET_REQ_SUCCESS(req)   SET_REQ_STATUS((req), STATUS_SUCCESS)
 
#define UNREGISTER_HANDLE_REQ(loop, handle, req)
 
#define UV_SUCCEEDED_WITH_IOCP(result)   ((result) || (GetLastError() == ERROR_IO_PENDING))
 
#define UV_SUCCEEDED_WITHOUT_IOCP(result)   ((result) && (handle->flags & UV_HANDLE_SYNC_BYPASS_IOCP))
 

Functions

static INLINE void uv_insert_pending_req (uv_loop_t *loop, uv_req_t *req)
 
static INLINE uv_req_tuv_overlapped_to_req (OVERLAPPED *overlapped)
 
static INLINE int uv_process_reqs (uv_loop_t *loop)
 

Macro Definition Documentation

◆ DELEGATE_STREAM_REQ

#define DELEGATE_STREAM_REQ (   loop,
  req,
  method,
  handle_at 
)
Value:
do { \
switch (((uv_handle_t*) (req)->handle_at)->type) { \
case UV_TCP: \
uv_process_tcp_##method##_req(loop, \
(uv_tcp_t*) ((req)->handle_at), \
req); \
break; \
\
case UV_NAMED_PIPE: \
uv_process_pipe_##method##_req(loop, \
(uv_pipe_t*) ((req)->handle_at), \
req); \
break; \
\
case UV_TTY: \
uv_process_tty_##method##_req(loop, \
(uv_tty_t*) ((req)->handle_at), \
req); \
break; \
\
default: \
assert(0); \
} \
} while (0)

Definition at line 114 of file req-inl.h.

◆ GET_REQ_ERROR

#define GET_REQ_ERROR (   req)    (pRtlNtStatusToDosError(GET_REQ_STATUS((req))))

Definition at line 49 of file req-inl.h.

◆ GET_REQ_SOCK_ERROR

#define GET_REQ_SOCK_ERROR (   req)    (uv_ntstatus_to_winsock_error(GET_REQ_STATUS((req))))

Definition at line 52 of file req-inl.h.

◆ GET_REQ_STATUS

#define GET_REQ_STATUS (   req)    ((NTSTATUS) (req)->u.io.overlapped.Internal)

Definition at line 43 of file req-inl.h.

◆ POST_COMPLETION_FOR_REQ

#define POST_COMPLETION_FOR_REQ (   loop,
  req 
)
Value:
if (!PostQueuedCompletionStatus((loop)->iocp, \
0, \
0, \
&((req)->u.io.overlapped))) { \
uv_fatal_error(GetLastError(), "PostQueuedCompletionStatus"); \
}

Definition at line 76 of file req-inl.h.

◆ REGISTER_HANDLE_REQ

#define REGISTER_HANDLE_REQ (   loop,
  handle,
  req 
)
Value:
do { \
INCREASE_ACTIVE_COUNT((loop), (handle)); \
uv__req_register((loop), (req)); \
} while (0)

Definition at line 56 of file req-inl.h.

◆ REQ_SUCCESS

#define REQ_SUCCESS (   req)    (NT_SUCCESS(GET_REQ_STATUS((req))))

Definition at line 46 of file req-inl.h.

◆ SET_REQ_ERROR

#define SET_REQ_ERROR (   req,
  error 
)    SET_REQ_STATUS((req), NTSTATUS_FROM_WIN32((error)))

Definition at line 34 of file req-inl.h.

◆ SET_REQ_STATUS

#define SET_REQ_STATUS (   req,
  status 
)    (req)->u.io.overlapped.Internal = (ULONG_PTR) (status)

Definition at line 31 of file req-inl.h.

◆ SET_REQ_SUCCESS

#define SET_REQ_SUCCESS (   req)    SET_REQ_STATUS((req), STATUS_SUCCESS)

Definition at line 40 of file req-inl.h.

◆ UNREGISTER_HANDLE_REQ

#define UNREGISTER_HANDLE_REQ (   loop,
  handle,
  req 
)
Value:
do { \
DECREASE_ACTIVE_COUNT((loop), (handle)); \
uv__req_unregister((loop), (req)); \
} while (0)

Definition at line 62 of file req-inl.h.

◆ UV_SUCCEEDED_WITH_IOCP

#define UV_SUCCEEDED_WITH_IOCP (   result)    ((result) || (GetLastError() == ERROR_IO_PENDING))

Definition at line 72 of file req-inl.h.

◆ UV_SUCCEEDED_WITHOUT_IOCP

#define UV_SUCCEEDED_WITHOUT_IOCP (   result)    ((result) && (handle->flags & UV_HANDLE_SYNC_BYPASS_IOCP))

Definition at line 69 of file req-inl.h.

Function Documentation

◆ uv_insert_pending_req()

static INLINE void uv_insert_pending_req ( uv_loop_t loop,
uv_req_t req 
)
static

Definition at line 90 of file req-inl.h.

◆ uv_overlapped_to_req()

static INLINE uv_req_t* uv_overlapped_to_req ( OVERLAPPED *  overlapped)
static

Definition at line 85 of file req-inl.h.

◆ uv_process_reqs()

static INLINE int uv_process_reqs ( uv_loop_t loop)
static

Definition at line 141 of file req-inl.h.

async_greeter_server_with_graceful_shutdown.loop
loop
Definition: async_greeter_server_with_graceful_shutdown.py:59
uv_tty_s
Definition: uv.h:704
u
OPENSSL_EXPORT pem_password_cb void * u
Definition: pem.h:351
req
static uv_connect_t req
Definition: test-connection-fail.c:30
uv_tcp_s
Definition: uv.h:544
uv_pipe_s
Definition: uv.h:757
handle
static csh handle
Definition: test_arm_regression.c:16
uv_handle_s
Definition: uv.h:441
asyncio_get_stats.type
type
Definition: asyncio_get_stats.py:37
method
NSString * method
Definition: ProtoMethod.h:28


grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:28