Classes | Macros | Typedefs | Enumerations | Functions | Variables
wepoll.c File Reference
#include <stdint.h>
#include <assert.h>
#include <stdlib.h>
#include <winsock2.h>
#include <ws2tcpip.h>
#include <windows.h>
#include <stdbool.h>
#include <errno.h>
#include <stddef.h>
#include <string.h>
Include dependency graph for wepoll.c:

Go to the source code of this file.

Classes

struct  _AFD_POLL_HANDLE_INFO
 
struct  _AFD_POLL_INFO
 
struct  _IO_STATUS_BLOCK
 
struct  _OBJECT_ATTRIBUTES
 
struct  _UNICODE_STRING
 
union  epoll_data
 
struct  epoll_event
 
struct  poll_group
 
struct  port_state
 
struct  queue
 
struct  queue_node
 
struct  reflock
 
struct  sock_state
 
struct  tree
 
struct  tree_node
 
struct  ts_tree
 
struct  ts_tree_node
 

Macros

#define _WIN32_WINNT   0x0600
 
#define AFD_POLL_ABORT   0x0010
 
#define AFD_POLL_ACCEPT   0x0080
 
#define AFD_POLL_CONNECT_FAIL   0x0100
 
#define AFD_POLL_DISCONNECT   0x0008
 
#define AFD_POLL_LOCAL_CLOSE   0x0020
 
#define AFD_POLL_RECEIVE   0x0001
 
#define AFD_POLL_RECEIVE_EXPEDITED   0x0002
 
#define AFD_POLL_SEND   0x0004
 
#define array_count(a)   (sizeof(a) / (sizeof((a)[0])))
 
#define container_of(ptr, type, member)   ((type*) ((uintptr_t) (ptr) - offsetof(type, member)))
 
#define EPOLL_CTL_ADD   1
 
#define EPOLL_CTL_DEL   3
 
#define EPOLL_CTL_MOD   2
 
#define EPOLLERR   (1U << 3)
 
#define EPOLLHUP   (1U << 4)
 
#define EPOLLIN   (1U << 0)
 
#define EPOLLMSG   (1U << 10)
 
#define EPOLLONESHOT   (1U << 31)
 
#define EPOLLOUT   (1U << 2)
 
#define EPOLLPRI   (1U << 1)
 
#define EPOLLRDBAND   (1U << 7)
 
#define EPOLLRDHUP   (1U << 13)
 
#define EPOLLRDNORM   (1U << 6)
 
#define EPOLLWRBAND   (1U << 9)
 
#define EPOLLWRNORM   (1U << 8)
 
#define ERR__ERRNO_MAPPINGS(X)
 
#define FILE_OPEN   0x00000001UL
 
#define IOCTL_AFD_POLL   0x00012024
 
#define KEYEDEVENT_ALL_ACCESS   (STANDARD_RIGHTS_REQUIRED | KEYEDEVENT_WAIT | KEYEDEVENT_WAKE)
 
#define KEYEDEVENT_WAIT   0x00000001UL
 
#define KEYEDEVENT_WAKE   0x00000002UL
 
#define NT_NTDLL_IMPORT_LIST(X)
 
#define NT_SUCCESS(status)   (((NTSTATUS)(status)) >= 0)
 
#define POLL_GROUP__MAX_GROUP_SIZE   32
 
#define PORT__MAX_ON_STACK_COMPLETIONS   256
 
#define REFLOCK__DESTROY   ((long) 0x10000000UL)
 
#define REFLOCK__DESTROY_MASK   ((long) 0xf0000000UL)
 
#define REFLOCK__POISON   ((long) 0x300dead0UL)
 
#define REFLOCK__REF   ((long) 0x00000001UL)
 
#define REFLOCK__REF_MASK   ((long) 0x0fffffffUL)
 
#define return_map_error(value)
 
#define return_set_error(value, error)
 
#define RTL_CONSTANT_OBJECT_ATTRIBUTES(ObjectName, Attributes)   { sizeof(OBJECT_ATTRIBUTES), NULL, ObjectName, Attributes, NULL, NULL }
 
#define RTL_CONSTANT_STRING(s)   { sizeof(s) - sizeof((s)[0]), sizeof(s), s }
 
#define SIO_BASE_HANDLE   0x48000022
 
#define SIO_BSP_HANDLE_POLL   0x4800001D
 
#define SOCK__KNOWN_EPOLL_EVENTS
 
#define STATUS_CANCELLED   ((NTSTATUS) 0xC0000120L)
 
#define STATUS_NOT_FOUND   ((NTSTATUS) 0xC0000225L)
 
#define STATUS_PENDING   ((NTSTATUS) 0x00000103L)
 
#define STATUS_SUCCESS   ((NTSTATUS) 0x00000000L)
 
#define TREE__INSERT_OR_DESCEND(side)
 
#define TREE__REBALANCE_AFTER_INSERT(cis, trans)
 
#define TREE__REBALANCE_AFTER_REMOVE(cis, trans)
 
#define TREE__ROTATE(cis, trans)
 
#define unused_var(v)   ((void) (v))
 
#define WEPOLL_EXPORT
 
#define WEPOLL_INTERNAL   static
 
#define WEPOLL_INTERNAL_EXTERN   static
 
#define WIN32_LEAN_AND_MEAN
 
#define X(error_sym, errno_sym)
 
#define X(return_type, attributes, name, parameters)   WEPOLL_INTERNAL_EXTERN return_type(attributes* name) parameters;
 
#define X(return_type, attributes, name, parameters)   WEPOLL_INTERNAL return_type(attributes* name) parameters = NULL;
 
#define X(return_type, attributes, name, parameters)
 

Typedefs

typedef struct _AFD_POLL_HANDLE_INFO AFD_POLL_HANDLE_INFO
 
typedef struct _AFD_POLL_INFO AFD_POLL_INFO
 
typedef union epoll_data epoll_data_t
 
typedef voidHANDLE
 
typedef struct _IO_STATUS_BLOCK IO_STATUS_BLOCK
 
typedef FARPROC nt__fn_ptr_cast_t
 
typedef LONG NTSTATUS
 
typedef struct _OBJECT_ATTRIBUTES OBJECT_ATTRIBUTES
 
typedef struct _AFD_POLL_HANDLE_INFOPAFD_POLL_HANDLE_INFO
 
typedef struct _AFD_POLL_INFOPAFD_POLL_INFO
 
typedef VOID(NTAPI * PIO_APC_ROUTINE) (PVOID ApcContext, PIO_STATUS_BLOCK IoStatusBlock, ULONG Reserved)
 
typedef struct _IO_STATUS_BLOCKPIO_STATUS_BLOCK
 
typedef NTSTATUSPNTSTATUS
 
typedef struct _OBJECT_ATTRIBUTESPOBJECT_ATTRIBUTES
 
typedef struct poll_group poll_group_t
 
typedef struct port_state port_state_t
 
typedef struct _UNICODE_STRINGPUNICODE_STRING
 
typedef struct queue_node queue_node_t
 
typedef struct queue queue_t
 
typedef struct reflock reflock_t
 
typedef enum sock__poll_status sock__poll_status_t
 
typedef struct sock_state sock_state_t
 
typedef uintptr_t SOCKET
 
typedef struct tree_node tree_node_t
 
typedef struct tree tree_t
 
typedef struct ts_tree_node ts_tree_node_t
 
typedef struct ts_tree ts_tree_t
 
typedef struct _UNICODE_STRING UNICODE_STRING
 

Enumerations

enum  EPOLL_EVENTS {
  EPOLLIN = (int) (1U << 0), EPOLLPRI = (int) (1U << 1), EPOLLOUT = (int) (1U << 2), EPOLLERR = (int) (1U << 3),
  EPOLLHUP = (int) (1U << 4), EPOLLRDNORM = (int) (1U << 6), EPOLLRDBAND = (int) (1U << 7), EPOLLWRNORM = (int) (1U << 8),
  EPOLLWRBAND = (int) (1U << 9), EPOLLMSG = (int) (1U << 10), EPOLLRDHUP = (int) (1U << 13), EPOLLONESHOT = (int) (1U << 31),
  EPOLLIN = (int) (1U << 0), EPOLLPRI = (int) (1U << 1), EPOLLOUT = (int) (1U << 2), EPOLLERR = (int) (1U << 3),
  EPOLLHUP = (int) (1U << 4), EPOLLRDNORM = (int) (1U << 6), EPOLLRDBAND = (int) (1U << 7), EPOLLWRNORM = (int) (1U << 8),
  EPOLLWRBAND = (int) (1U << 9), EPOLLMSG = (int) (1U << 10), EPOLLRDHUP = (int) (1U << 13), EPOLLONESHOT = (int) (1U << 31)
}
 
enum  sock__poll_status { SOCK__POLL_IDLE = 0, SOCK__POLL_PENDING, SOCK__POLL_CANCELLED }
 

Functions

WEPOLL_INTERNAL int afd_cancel_poll (HANDLE afd_device_handle, IO_STATUS_BLOCK *io_status_block)
 
WEPOLL_INTERNAL int afd_create_device_handle (HANDLE iocp_handle, HANDLE *afd_device_handle_out)
 
WEPOLL_INTERNAL int afd_poll (HANDLE afd_device_handle, AFD_POLL_INFO *poll_info, IO_STATUS_BLOCK *io_status_block)
 
static HANDLE epoll__create (void)
 
WEPOLL_EXPORT int epoll_close (HANDLE ephnd)
 
WEPOLL_EXPORT HANDLE epoll_create (int size)
 
WEPOLL_EXPORT HANDLE epoll_create1 (int flags)
 
WEPOLL_EXPORT int epoll_ctl (HANDLE ephnd, int op, SOCKET sock, struct epoll_event *event)
 
WEPOLL_INTERNAL int epoll_global_init (void)
 
WEPOLL_EXPORT int epoll_wait (HANDLE ephnd, struct epoll_event *events, int maxevents, int timeout)
 
static errno_t err__map_win_error_to_errno (DWORD error)
 
WEPOLL_INTERNAL int err_check_handle (HANDLE handle)
 
WEPOLL_INTERNAL void err_map_win_error (void)
 
WEPOLL_INTERNAL void err_set_win_error (DWORD error)
 
WEPOLL_INTERNAL int init (void)
 
static BOOL CALLBACK init__once_callback (INIT_ONCE *once, void *parameter, void **context)
 
WEPOLL_INTERNAL int nt_global_init (void)
 
static poll_group_tpoll_group__new (port_state_t *port_state)
 
WEPOLL_INTERNAL poll_group_tpoll_group_acquire (port_state_t *port)
 
WEPOLL_INTERNAL void poll_group_delete (poll_group_t *poll_group)
 
WEPOLL_INTERNAL poll_group_tpoll_group_from_queue_node (queue_node_t *queue_node)
 
WEPOLL_INTERNAL HANDLE poll_group_get_afd_device_handle (poll_group_t *poll_group)
 
WEPOLL_INTERNAL void poll_group_release (poll_group_t *poll_group)
 
static port_state_tport__alloc (void)
 
static int port__close_iocp (port_state_t *port_state)
 
static HANDLE port__create_iocp (void)
 
static int port__ctl_add (port_state_t *port_state, SOCKET sock, struct epoll_event *ev)
 
static int port__ctl_del (port_state_t *port_state, SOCKET sock)
 
static int port__ctl_mod (port_state_t *port_state, SOCKET sock, struct epoll_event *ev)
 
static int port__ctl_op (port_state_t *port_state, int op, SOCKET sock, struct epoll_event *ev)
 
static int port__feed_events (port_state_t *port_state, struct epoll_event *epoll_events, OVERLAPPED_ENTRY *iocp_events, DWORD iocp_event_count)
 
static void port__free (port_state_t *port)
 
static int port__poll (port_state_t *port_state, struct epoll_event *epoll_events, OVERLAPPED_ENTRY *iocp_events, DWORD maxevents, DWORD timeout)
 
static int port__update_events (port_state_t *port_state)
 
static void port__update_events_if_polling (port_state_t *port_state)
 
WEPOLL_INTERNAL void port_add_deleted_socket (port_state_t *port_state, sock_state_t *sock_state)
 
WEPOLL_INTERNAL void port_cancel_socket_update (port_state_t *port_state, sock_state_t *sock_state)
 
WEPOLL_INTERNAL int port_close (port_state_t *port_state)
 
WEPOLL_INTERNAL int port_ctl (port_state_t *port_state, int op, SOCKET sock, struct epoll_event *ev)
 
WEPOLL_INTERNAL int port_delete (port_state_t *port_state)
 
WEPOLL_INTERNAL sock_state_tport_find_socket (port_state_t *port_state, SOCKET socket)
 
WEPOLL_INTERNAL HANDLE port_get_iocp_handle (port_state_t *port_state)
 
WEPOLL_INTERNAL queue_tport_get_poll_group_queue (port_state_t *port_state)
 
WEPOLL_INTERNAL port_state_tport_new (HANDLE *iocp_handle_out)
 
WEPOLL_INTERNAL int port_register_socket (port_state_t *port_state, sock_state_t *sock_state, SOCKET socket)
 
WEPOLL_INTERNAL void port_remove_deleted_socket (port_state_t *port_state, sock_state_t *sock_state)
 
WEPOLL_INTERNAL void port_request_socket_update (port_state_t *port_state, sock_state_t *sock_state)
 
WEPOLL_INTERNAL port_state_tport_state_from_handle_tree_node (ts_tree_node_t *tree_node)
 
WEPOLL_INTERNAL ts_tree_node_tport_state_to_handle_tree_node (port_state_t *port_state)
 
WEPOLL_INTERNAL void port_unregister_socket (port_state_t *port_state, sock_state_t *sock_state)
 
WEPOLL_INTERNAL int port_wait (port_state_t *port_state, struct epoll_event *events, int maxevents, int timeout)
 
static void queue__detach_node (queue_node_t *node)
 
WEPOLL_INTERNAL void queue_append (queue_t *queue, queue_node_t *node)
 
WEPOLL_INTERNAL queue_node_tqueue_first (const queue_t *queue)
 
WEPOLL_INTERNAL void queue_init (queue_t *queue)
 
WEPOLL_INTERNAL bool queue_is_empty (const queue_t *queue)
 
WEPOLL_INTERNAL bool queue_is_enqueued (const queue_node_t *node)
 
WEPOLL_INTERNAL queue_node_tqueue_last (const queue_t *queue)
 
WEPOLL_INTERNAL void queue_move_to_end (queue_t *queue, queue_node_t *node)
 
WEPOLL_INTERNAL void queue_move_to_start (queue_t *queue, queue_node_t *node)
 
WEPOLL_INTERNAL void queue_node_init (queue_node_t *node)
 
WEPOLL_INTERNAL void queue_prepend (queue_t *queue, queue_node_t *node)
 
WEPOLL_INTERNAL void queue_remove (queue_node_t *node)
 
static void reflock__await_event (void *address)
 
static void reflock__signal_event (void *address)
 
WEPOLL_INTERNAL int reflock_global_init (void)
 
WEPOLL_INTERNAL void reflock_init (reflock_t *reflock)
 
WEPOLL_INTERNAL void reflock_ref (reflock_t *reflock)
 
WEPOLL_INTERNAL void reflock_unref (reflock_t *reflock)
 
WEPOLL_INTERNAL void reflock_unref_and_destroy (reflock_t *reflock)
 
static uint32_t sock__afd_events_to_epoll_events (DWORD afd_events)
 
static sock_state_tsock__alloc (void)
 
static int sock__cancel_poll (sock_state_t *sock_state)
 
static int sock__delete (port_state_t *port_state, sock_state_t *sock_state, bool force)
 
static DWORD sock__epoll_events_to_afd_events (uint32_t epoll_events)
 
static void sock__free (sock_state_t *sock_state)
 
WEPOLL_INTERNAL void sock_delete (port_state_t *port_state, sock_state_t *sock_state)
 
WEPOLL_INTERNAL int sock_feed_event (port_state_t *port_state, IO_STATUS_BLOCK *io_status_block, struct epoll_event *ev)
 
WEPOLL_INTERNAL void sock_force_delete (port_state_t *port_state, sock_state_t *sock_state)
 
WEPOLL_INTERNAL sock_state_tsock_new (port_state_t *port_state, SOCKET socket)
 
WEPOLL_INTERNAL int sock_set_event (port_state_t *port_state, sock_state_t *sock_state, const struct epoll_event *ev)
 
WEPOLL_INTERNAL sock_state_tsock_state_from_queue_node (queue_node_t *queue_node)
 
WEPOLL_INTERNAL sock_state_tsock_state_from_tree_node (tree_node_t *tree_node)
 
WEPOLL_INTERNAL queue_node_tsock_state_to_queue_node (sock_state_t *sock_state)
 
WEPOLL_INTERNAL tree_node_tsock_state_to_tree_node (sock_state_t *sock_state)
 
WEPOLL_INTERNAL int sock_update (port_state_t *port_state, sock_state_t *sock_state)
 
static void tree__rotate_left (tree_t *tree, tree_node_t *node)
 
static void tree__rotate_right (tree_t *tree, tree_node_t *node)
 
WEPOLL_INTERNAL int tree_add (tree_t *tree, tree_node_t *node, uintptr_t key)
 
WEPOLL_INTERNAL void tree_del (tree_t *tree, tree_node_t *node)
 
WEPOLL_INTERNAL tree_node_ttree_find (const tree_t *tree, uintptr_t key)
 
WEPOLL_INTERNAL void tree_init (tree_t *tree)
 
WEPOLL_INTERNAL void tree_node_init (tree_node_t *node)
 
WEPOLL_INTERNAL tree_node_ttree_root (const tree_t *tree)
 
static ts_tree_node_tts_tree__find_node (ts_tree_t *ts_tree, uintptr_t key)
 
WEPOLL_INTERNAL int ts_tree_add (ts_tree_t *ts_tree, ts_tree_node_t *node, uintptr_t key)
 
WEPOLL_INTERNAL ts_tree_node_tts_tree_del_and_ref (ts_tree_t *ts_tree, uintptr_t key)
 
WEPOLL_INTERNAL ts_tree_node_tts_tree_find_and_ref (ts_tree_t *ts_tree, uintptr_t key)
 
WEPOLL_INTERNAL void ts_tree_init (ts_tree_t *rtl)
 
WEPOLL_INTERNAL void ts_tree_node_init (ts_tree_node_t *node)
 
WEPOLL_INTERNAL void ts_tree_node_unref (ts_tree_node_t *node)
 
WEPOLL_INTERNAL void ts_tree_node_unref_and_destroy (ts_tree_node_t *node)
 
static SOCKET ws__ioctl_get_bsp_socket (SOCKET socket, DWORD ioctl)
 
WEPOLL_INTERNAL SOCKET ws_get_base_socket (SOCKET socket)
 
WEPOLL_INTERNAL int ws_global_init (void)
 

Variables

static OBJECT_ATTRIBUTES afd__device_attributes
 
static UNICODE_STRING afd__device_name
 
static ts_tree_t epoll__handle_tree
 
static bool init__done = false
 
static INIT_ONCE init__once = INIT_ONCE_STATIC_INIT
 
static HANDLE reflock__keyed_event = NULL
 

Macro Definition Documentation

◆ _WIN32_WINNT

#define _WIN32_WINNT   0x0600

Definition at line 129 of file wepoll.c.

◆ AFD_POLL_ABORT

#define AFD_POLL_ABORT   0x0010

Definition at line 277 of file wepoll.c.

◆ AFD_POLL_ACCEPT

#define AFD_POLL_ACCEPT   0x0080

Definition at line 279 of file wepoll.c.

◆ AFD_POLL_CONNECT_FAIL

#define AFD_POLL_CONNECT_FAIL   0x0100

Definition at line 280 of file wepoll.c.

◆ AFD_POLL_DISCONNECT

#define AFD_POLL_DISCONNECT   0x0008

Definition at line 276 of file wepoll.c.

◆ AFD_POLL_LOCAL_CLOSE

#define AFD_POLL_LOCAL_CLOSE   0x0020

Definition at line 278 of file wepoll.c.

◆ AFD_POLL_RECEIVE

#define AFD_POLL_RECEIVE   0x0001

Definition at line 273 of file wepoll.c.

◆ AFD_POLL_RECEIVE_EXPEDITED

#define AFD_POLL_RECEIVE_EXPEDITED   0x0002

Definition at line 274 of file wepoll.c.

◆ AFD_POLL_SEND

#define AFD_POLL_SEND   0x0004

Definition at line 275 of file wepoll.c.

◆ array_count

#define array_count (   a)    (sizeof(a) / (sizeof((a)[0])))

Definition at line 824 of file wepoll.c.

◆ container_of

#define container_of (   ptr,
  type,
  member 
)    ((type*) ((uintptr_t) (ptr) - offsetof(type, member)))

Definition at line 826 of file wepoll.c.

◆ EPOLL_CTL_ADD

#define EPOLL_CTL_ADD   1

Definition at line 66 of file wepoll.c.

◆ EPOLL_CTL_DEL

#define EPOLL_CTL_DEL   3

Definition at line 68 of file wepoll.c.

◆ EPOLL_CTL_MOD

#define EPOLL_CTL_MOD   2

Definition at line 67 of file wepoll.c.

◆ EPOLLERR

#define EPOLLERR   (1U << 3)

Definition at line 56 of file wepoll.c.

◆ EPOLLHUP

#define EPOLLHUP   (1U << 4)

Definition at line 57 of file wepoll.c.

◆ EPOLLIN

#define EPOLLIN   (1U << 0)

Definition at line 53 of file wepoll.c.

◆ EPOLLMSG

#define EPOLLMSG   (1U << 10)

Definition at line 62 of file wepoll.c.

◆ EPOLLONESHOT

#define EPOLLONESHOT   (1U << 31)

Definition at line 64 of file wepoll.c.

◆ EPOLLOUT

#define EPOLLOUT   (1U << 2)

Definition at line 55 of file wepoll.c.

◆ EPOLLPRI

#define EPOLLPRI   (1U << 1)

Definition at line 54 of file wepoll.c.

◆ EPOLLRDBAND

#define EPOLLRDBAND   (1U << 7)

Definition at line 59 of file wepoll.c.

◆ EPOLLRDHUP

#define EPOLLRDHUP   (1U << 13)

Definition at line 63 of file wepoll.c.

◆ EPOLLRDNORM

#define EPOLLRDNORM   (1U << 6)

Definition at line 58 of file wepoll.c.

◆ EPOLLWRBAND

#define EPOLLWRBAND   (1U << 9)

Definition at line 61 of file wepoll.c.

◆ EPOLLWRNORM

#define EPOLLWRNORM   (1U << 8)

Definition at line 60 of file wepoll.c.

◆ ERR__ERRNO_MAPPINGS

#define ERR__ERRNO_MAPPINGS (   X)

Definition at line 685 of file wepoll.c.

◆ FILE_OPEN

#define FILE_OPEN   0x00000001UL

Definition at line 197 of file wepoll.c.

◆ IOCTL_AFD_POLL

#define IOCTL_AFD_POLL   0x00012024

Definition at line 320 of file wepoll.c.

◆ KEYEDEVENT_ALL_ACCESS

#define KEYEDEVENT_ALL_ACCESS   (STANDARD_RIGHTS_REQUIRED | KEYEDEVENT_WAIT | KEYEDEVENT_WAKE)

Definition at line 202 of file wepoll.c.

◆ KEYEDEVENT_WAIT

#define KEYEDEVENT_WAIT   0x00000001UL

Definition at line 200 of file wepoll.c.

◆ KEYEDEVENT_WAKE

#define KEYEDEVENT_WAKE   0x00000002UL

Definition at line 201 of file wepoll.c.

◆ NT_NTDLL_IMPORT_LIST

#define NT_NTDLL_IMPORT_LIST (   X)

Definition at line 205 of file wepoll.c.

◆ NT_SUCCESS

#define NT_SUCCESS (   status)    (((NTSTATUS)(status)) >= 0)

Definition at line 147 of file wepoll.c.

◆ POLL_GROUP__MAX_GROUP_SIZE

#define POLL_GROUP__MAX_GROUP_SIZE   32

Definition at line 946 of file wepoll.c.

◆ PORT__MAX_ON_STACK_COMPLETIONS

#define PORT__MAX_ON_STACK_COMPLETIONS   256

Definition at line 1051 of file wepoll.c.

◆ REFLOCK__DESTROY

#define REFLOCK__DESTROY   ((long) 0x10000000UL)

Definition at line 1522 of file wepoll.c.

◆ REFLOCK__DESTROY_MASK

#define REFLOCK__DESTROY_MASK   ((long) 0xf0000000UL)

Definition at line 1523 of file wepoll.c.

◆ REFLOCK__POISON

#define REFLOCK__POISON   ((long) 0x300dead0UL)

Definition at line 1524 of file wepoll.c.

◆ REFLOCK__REF

#define REFLOCK__REF   ((long) 0x00000001UL)

Definition at line 1520 of file wepoll.c.

◆ REFLOCK__REF_MASK

#define REFLOCK__REF_MASK   ((long) 0x0fffffffUL)

Definition at line 1521 of file wepoll.c.

◆ return_map_error

#define return_map_error (   value)
Value:
do { \
err_map_win_error(); \
return (value); \
} while (0)

Definition at line 304 of file wepoll.c.

◆ return_set_error

#define return_set_error (   value,
  error 
)
Value:
do { \
err_set_win_error(error); \
return (value); \
} while (0)

Definition at line 310 of file wepoll.c.

◆ RTL_CONSTANT_OBJECT_ATTRIBUTES

#define RTL_CONSTANT_OBJECT_ATTRIBUTES (   ObjectName,
  Attributes 
)    { sizeof(OBJECT_ATTRIBUTES), NULL, ObjectName, Attributes, NULL, NULL }

Definition at line 193 of file wepoll.c.

◆ RTL_CONSTANT_STRING

#define RTL_CONSTANT_STRING (   s)    { sizeof(s) - sizeof((s)[0]), sizeof(s), s }

Definition at line 181 of file wepoll.c.

◆ SIO_BASE_HANDLE

#define SIO_BASE_HANDLE   0x48000022

Definition at line 2191 of file wepoll.c.

◆ SIO_BSP_HANDLE_POLL

#define SIO_BSP_HANDLE_POLL   0x4800001D

Definition at line 2187 of file wepoll.c.

◆ SOCK__KNOWN_EPOLL_EVENTS

#define SOCK__KNOWN_EPOLL_EVENTS
Value:

Definition at line 1587 of file wepoll.c.

◆ STATUS_CANCELLED

#define STATUS_CANCELLED   ((NTSTATUS) 0xC0000120L)

Definition at line 159 of file wepoll.c.

◆ STATUS_NOT_FOUND

#define STATUS_NOT_FOUND   ((NTSTATUS) 0xC0000225L)

Definition at line 163 of file wepoll.c.

◆ STATUS_PENDING

#define STATUS_PENDING   ((NTSTATUS) 0x00000103L)

Definition at line 155 of file wepoll.c.

◆ STATUS_SUCCESS

#define STATUS_SUCCESS   ((NTSTATUS) 0x00000000L)

Definition at line 151 of file wepoll.c.

◆ TREE__INSERT_OR_DESCEND

#define TREE__INSERT_OR_DESCEND (   side)
Value:
if (parent->side) { \
parent = parent->side; \
} else { \
parent->side = node; \
break; \
}

Definition at line 2009 of file wepoll.c.

◆ TREE__REBALANCE_AFTER_INSERT

#define TREE__REBALANCE_AFTER_INSERT (   cis,
  trans 
)
Value:
tree_node_t* grandparent = parent->parent; \
tree_node_t* uncle = grandparent->trans; \
if (uncle && uncle->red) { \
parent->red = uncle->red = false; \
grandparent->red = true; \
node = grandparent; \
} else { \
if (node == parent->trans) { \
tree__rotate_##cis(tree, parent); \
node = parent; \
parent = node->parent; \
} \
parent->red = false; \
grandparent->red = true; \
tree__rotate_##trans(tree, grandparent); \
}

Definition at line 2017 of file wepoll.c.

◆ TREE__REBALANCE_AFTER_REMOVE

#define TREE__REBALANCE_AFTER_REMOVE (   cis,
  trans 
)
Value:
tree_node_t* sibling = parent->trans; \
if (sibling->red) { \
sibling->red = false; \
parent->red = true; \
tree__rotate_##cis(tree, parent); \
sibling = parent->trans; \
} \
if ((sibling->left && sibling->left->red) || \
(sibling->right && sibling->right->red)) { \
if (!sibling->trans || !sibling->trans->red) { \
sibling->cis->red = false; \
sibling->red = true; \
tree__rotate_##trans(tree, sibling); \
sibling = parent->trans; \
} \
sibling->red = parent->red; \
parent->red = sibling->trans->red = false; \
tree__rotate_##cis(tree, parent); \
node = tree->root; \
break; \
} \
sibling->red = true;

Definition at line 2071 of file wepoll.c.

◆ TREE__ROTATE

#define TREE__ROTATE (   cis,
  trans 
)
Value:
tree_node_t* p = node; \
tree_node_t* q = node->trans; \
tree_node_t* parent = p->parent; \
if (parent) { \
if (parent->left == p) \
parent->left = q; \
else \
parent->right = q; \
} else { \
tree->root = q; \
} \
\
q->parent = parent; \
p->parent = q; \
p->trans = q->cis; \
if (p->trans) \
p->trans->parent = p; \
q->cis = p;

Definition at line 1980 of file wepoll.c.

◆ unused_var

#define unused_var (   v)    ((void) (v))

Definition at line 829 of file wepoll.c.

◆ WEPOLL_EXPORT

#define WEPOLL_EXPORT

Definition at line 33 of file wepoll.c.

◆ WEPOLL_INTERNAL

#define WEPOLL_INTERNAL   static

Definition at line 114 of file wepoll.c.

◆ WEPOLL_INTERNAL_EXTERN

#define WEPOLL_INTERNAL_EXTERN   static

Definition at line 115 of file wepoll.c.

◆ WIN32_LEAN_AND_MEAN

#define WIN32_LEAN_AND_MEAN

Definition at line 126 of file wepoll.c.

◆ X [1/4]

#define X (   error_sym,
  errno_sym 
)
Value:
case error_sym: \
return errno_sym;

Definition at line 882 of file wepoll.c.

◆ X [2/4]

#define X (   return_type,
  attributes,
  name,
  parameters 
)    WEPOLL_INTERNAL_EXTERN return_type(attributes* name) parameters;

Definition at line 882 of file wepoll.c.

◆ X [3/4]

#define X (   return_type,
  attributes,
  name,
  parameters 
)    WEPOLL_INTERNAL return_type(attributes* name) parameters = NULL;

Definition at line 882 of file wepoll.c.

◆ X [4/4]

#define X (   return_type,
  attributes,
  name,
  parameters 
)
Value:
fn_ptr = GetProcAddress(ntdll, #name); \
if (fn_ptr == NULL) \
return -1; \
name = (return_type(attributes*) parameters)(nt__fn_ptr_cast_t) fn_ptr;

Definition at line 882 of file wepoll.c.

Typedef Documentation

◆ AFD_POLL_HANDLE_INFO

◆ AFD_POLL_INFO

typedef struct _AFD_POLL_INFO AFD_POLL_INFO

◆ epoll_data_t

typedef union epoll_data epoll_data_t

◆ HANDLE

typedef void* HANDLE

Definition at line 70 of file wepoll.c.

◆ IO_STATUS_BLOCK

◆ nt__fn_ptr_cast_t

typedef FARPROC nt__fn_ptr_cast_t

Definition at line 879 of file wepoll.c.

◆ NTSTATUS

typedef LONG NTSTATUS

Definition at line 143 of file wepoll.c.

◆ OBJECT_ATTRIBUTES

◆ PAFD_POLL_HANDLE_INFO

◆ PAFD_POLL_INFO

typedef struct _AFD_POLL_INFO * PAFD_POLL_INFO

◆ PIO_APC_ROUTINE

typedef VOID(NTAPI* PIO_APC_ROUTINE) (PVOID ApcContext, PIO_STATUS_BLOCK IoStatusBlock, ULONG Reserved)

Definition at line 171 of file wepoll.c.

◆ PIO_STATUS_BLOCK

◆ PNTSTATUS

typedef NTSTATUS* PNTSTATUS

Definition at line 144 of file wepoll.c.

◆ POBJECT_ATTRIBUTES

◆ poll_group_t

typedef struct poll_group poll_group_t

Definition at line 908 of file wepoll.c.

◆ port_state_t

typedef struct port_state port_state_t

Definition at line 419 of file wepoll.c.

◆ PUNICODE_STRING

typedef struct _UNICODE_STRING * PUNICODE_STRING

◆ queue_node_t

typedef struct queue_node queue_node_t

Definition at line 910 of file wepoll.c.

◆ queue_t

typedef struct queue queue_t

Definition at line 420 of file wepoll.c.

◆ reflock_t

typedef struct reflock reflock_t

◆ sock__poll_status_t

◆ sock_state_t

typedef struct sock_state sock_state_t

Definition at line 421 of file wepoll.c.

◆ SOCKET

typedef uintptr_t SOCKET

Definition at line 71 of file wepoll.c.

◆ tree_node_t

typedef struct tree_node tree_node_t

Definition at line 500 of file wepoll.c.

◆ tree_t

typedef struct tree tree_t

Definition at line 499 of file wepoll.c.

◆ ts_tree_node_t

typedef struct ts_tree_node ts_tree_node_t

Definition at line 422 of file wepoll.c.

◆ ts_tree_t

typedef struct ts_tree ts_tree_t

◆ UNICODE_STRING

Enumeration Type Documentation

◆ EPOLL_EVENTS

Enumerator
EPOLLIN 
EPOLLPRI 
EPOLLOUT 
EPOLLERR 
EPOLLHUP 
EPOLLRDNORM 
EPOLLRDBAND 
EPOLLWRNORM 
EPOLLWRBAND 
EPOLLMSG 
EPOLLRDHUP 
EPOLLONESHOT 
EPOLLIN 
EPOLLPRI 
EPOLLOUT 
EPOLLERR 
EPOLLHUP 
EPOLLRDNORM 
EPOLLRDBAND 
EPOLLWRNORM 
EPOLLWRBAND 
EPOLLMSG 
EPOLLRDHUP 
EPOLLONESHOT 

Definition at line 38 of file wepoll.c.

◆ sock__poll_status

Enumerator
SOCK__POLL_IDLE 
SOCK__POLL_PENDING 
SOCK__POLL_CANCELLED 

Definition at line 1591 of file wepoll.c.

Function Documentation

◆ afd_cancel_poll()

int afd_cancel_poll ( HANDLE  afd_device_handle,
IO_STATUS_BLOCK io_status_block 
)

Definition at line 394 of file wepoll.c.

◆ afd_create_device_handle()

int afd_create_device_handle ( HANDLE  iocp_handle,
HANDLE afd_device_handle_out 
)

Definition at line 328 of file wepoll.c.

◆ afd_poll()

int afd_poll ( HANDLE  afd_device_handle,
AFD_POLL_INFO poll_info,
IO_STATUS_BLOCK io_status_block 
)

Definition at line 366 of file wepoll.c.

◆ epoll__create()

static HANDLE epoll__create ( void  )
static

Definition at line 555 of file wepoll.c.

◆ epoll_close()

int epoll_close ( HANDLE  ephnd)

Definition at line 591 of file wepoll.c.

◆ epoll_create()

HANDLE epoll_create ( int  size)

Definition at line 577 of file wepoll.c.

◆ epoll_create1()

HANDLE epoll_create1 ( int  flags)

Definition at line 584 of file wepoll.c.

◆ epoll_ctl()

int epoll_ctl ( HANDLE  ephnd,
int  op,
SOCKET  sock,
struct epoll_event event 
)

Definition at line 616 of file wepoll.c.

◆ epoll_global_init()

int epoll_global_init ( void  )

Definition at line 550 of file wepoll.c.

◆ epoll_wait()

int epoll_wait ( HANDLE  ephnd,
struct epoll_event events,
int  maxevents,
int  timeout 
)

Definition at line 648 of file wepoll.c.

◆ err__map_win_error_to_errno()

static errno_t err__map_win_error_to_errno ( DWORD  error)
static

Definition at line 788 of file wepoll.c.

◆ err_check_handle()

int err_check_handle ( HANDLE  handle)

Definition at line 808 of file wepoll.c.

◆ err_map_win_error()

void err_map_win_error ( void  )

Definition at line 799 of file wepoll.c.

◆ err_set_win_error()

void err_set_win_error ( DWORD  error)

Definition at line 803 of file wepoll.c.

◆ init()

int init ( void  )

Definition at line 858 of file wepoll.c.

◆ init__once_callback()

static BOOL CALLBACK init__once_callback ( INIT_ONCE *  once,
void parameter,
void **  context 
)
static

Definition at line 842 of file wepoll.c.

◆ nt_global_init()

int nt_global_init ( void  )

Definition at line 887 of file wepoll.c.

◆ poll_group__new()

static poll_group_t* poll_group__new ( port_state_t port_state)
static

Definition at line 955 of file wepoll.c.

◆ poll_group_acquire()

poll_group_t * poll_group_acquire ( port_state_t port)

Definition at line 994 of file wepoll.c.

◆ poll_group_delete()

void poll_group_delete ( poll_group_t poll_group)

Definition at line 979 of file wepoll.c.

◆ poll_group_from_queue_node()

poll_group_t * poll_group_from_queue_node ( queue_node_t queue_node)

Definition at line 986 of file wepoll.c.

◆ poll_group_get_afd_device_handle()

HANDLE poll_group_get_afd_device_handle ( poll_group_t poll_group)

Definition at line 990 of file wepoll.c.

◆ poll_group_release()

void poll_group_release ( poll_group_t poll_group)

Definition at line 1014 of file wepoll.c.

◆ port__alloc()

static port_state_t* port__alloc ( void  )
inlinestatic

Definition at line 1064 of file wepoll.c.

◆ port__close_iocp()

static int port__close_iocp ( port_state_t port_state)
inlinestatic

Definition at line 1117 of file wepoll.c.

◆ port__create_iocp()

static HANDLE port__create_iocp ( void  )
inlinestatic

Definition at line 1077 of file wepoll.c.

◆ port__ctl_add()

static int port__ctl_add ( port_state_t port_state,
SOCKET  sock,
struct epoll_event ev 
)
inlinestatic

Definition at line 1319 of file wepoll.c.

◆ port__ctl_del()

static int port__ctl_del ( port_state_t port_state,
SOCKET  sock 
)
inlinestatic

Definition at line 1351 of file wepoll.c.

◆ port__ctl_mod()

static int port__ctl_mod ( port_state_t port_state,
SOCKET  sock,
struct epoll_event ev 
)
inlinestatic

Definition at line 1336 of file wepoll.c.

◆ port__ctl_op()

static int port__ctl_op ( port_state_t port_state,
int  op,
SOCKET  sock,
struct epoll_event ev 
)
inlinestatic

Definition at line 1361 of file wepoll.c.

◆ port__feed_events()

static int port__feed_events ( port_state_t port_state,
struct epoll_event epoll_events,
OVERLAPPED_ENTRY *  iocp_events,
DWORD  iocp_event_count 
)
inlinestatic

Definition at line 1191 of file wepoll.c.

◆ port__free()

static void port__free ( port_state_t port)
inlinestatic

Definition at line 1072 of file wepoll.c.

◆ port__poll()

static int port__poll ( port_state_t port_state,
struct epoll_event epoll_events,
OVERLAPPED_ENTRY *  iocp_events,
DWORD  maxevents,
DWORD  timeout 
)
inlinestatic

Definition at line 1209 of file wepoll.c.

◆ port__update_events()

static int port__update_events ( port_state_t port_state)
static

Definition at line 1168 of file wepoll.c.

◆ port__update_events_if_polling()

static void port__update_events_if_polling ( port_state_t port_state)
inlinestatic

Definition at line 1186 of file wepoll.c.

◆ port_add_deleted_socket()

void port_add_deleted_socket ( port_state_t port_state,
sock_state_t sock_state 
)

Definition at line 1428 of file wepoll.c.

◆ port_cancel_socket_update()

void port_cancel_socket_update ( port_state_t port_state,
sock_state_t sock_state 
)

Definition at line 1420 of file wepoll.c.

◆ port_close()

int port_close ( port_state_t port_state)

Definition at line 1127 of file wepoll.c.

◆ port_ctl()

int port_ctl ( port_state_t port_state,
int  op,
SOCKET  sock,
struct epoll_event ev 
)

Definition at line 1377 of file wepoll.c.

◆ port_delete()

int port_delete ( port_state_t port_state)

Definition at line 1137 of file wepoll.c.

◆ port_find_socket()

sock_state_t * port_find_socket ( port_state_t port_state,
SOCKET  socket 
)

Definition at line 1405 of file wepoll.c.

◆ port_get_iocp_handle()

HANDLE port_get_iocp_handle ( port_state_t port_state)

Definition at line 1444 of file wepoll.c.

◆ port_get_poll_group_queue()

queue_t * port_get_poll_group_queue ( port_state_t port_state)

Definition at line 1449 of file wepoll.c.

◆ port_new()

port_state_t * port_new ( HANDLE iocp_handle_out)

Definition at line 1086 of file wepoll.c.

◆ port_register_socket()

int port_register_socket ( port_state_t port_state,
sock_state_t sock_state,
SOCKET  socket 
)

Definition at line 1390 of file wepoll.c.

◆ port_remove_deleted_socket()

void port_remove_deleted_socket ( port_state_t port_state,
sock_state_t sock_state 
)

Definition at line 1436 of file wepoll.c.

◆ port_request_socket_update()

void port_request_socket_update ( port_state_t port_state,
sock_state_t sock_state 
)

Definition at line 1412 of file wepoll.c.

◆ port_state_from_handle_tree_node()

port_state_t * port_state_from_handle_tree_node ( ts_tree_node_t tree_node)

Definition at line 1453 of file wepoll.c.

◆ port_state_to_handle_tree_node()

ts_tree_node_t * port_state_to_handle_tree_node ( port_state_t port_state)

Definition at line 1457 of file wepoll.c.

◆ port_unregister_socket()

void port_unregister_socket ( port_state_t port_state,
sock_state_t sock_state 
)

Definition at line 1400 of file wepoll.c.

◆ port_wait()

int port_wait ( port_state_t port_state,
struct epoll_event events,
int  maxevents,
int  timeout 
)

Definition at line 1241 of file wepoll.c.

◆ queue__detach_node()

static void queue__detach_node ( queue_node_t node)
inlinestatic

Definition at line 1470 of file wepoll.c.

◆ queue_append()

void queue_append ( queue_t queue,
queue_node_t node 
)

Definition at line 1490 of file wepoll.c.

◆ queue_first()

queue_node_t * queue_first ( const queue_t queue)

Definition at line 1475 of file wepoll.c.

◆ queue_init()

void queue_init ( queue_t queue)

Definition at line 1461 of file wepoll.c.

◆ queue_is_empty()

bool queue_is_empty ( const queue_t queue)

Definition at line 1512 of file wepoll.c.

◆ queue_is_enqueued()

bool queue_is_enqueued ( const queue_node_t node)

Definition at line 1516 of file wepoll.c.

◆ queue_last()

queue_node_t * queue_last ( const queue_t queue)

Definition at line 1479 of file wepoll.c.

◆ queue_move_to_end()

void queue_move_to_end ( queue_t queue,
queue_node_t node 
)

Definition at line 1502 of file wepoll.c.

◆ queue_move_to_start()

void queue_move_to_start ( queue_t queue,
queue_node_t node 
)

Definition at line 1497 of file wepoll.c.

◆ queue_node_init()

void queue_node_init ( queue_node_t node)

Definition at line 1465 of file wepoll.c.

◆ queue_prepend()

void queue_prepend ( queue_t queue,
queue_node_t node 
)

Definition at line 1483 of file wepoll.c.

◆ queue_remove()

void queue_remove ( queue_node_t node)

Definition at line 1507 of file wepoll.c.

◆ reflock__await_event()

static void reflock__await_event ( void address)
static

Definition at line 1547 of file wepoll.c.

◆ reflock__signal_event()

static void reflock__signal_event ( void address)
static

Definition at line 1540 of file wepoll.c.

◆ reflock_global_init()

int reflock_global_init ( void  )

Definition at line 1528 of file wepoll.c.

◆ reflock_init()

void reflock_init ( reflock_t reflock)

Definition at line 1536 of file wepoll.c.

◆ reflock_ref()

void reflock_ref ( reflock_t reflock)

Definition at line 1554 of file wepoll.c.

◆ reflock_unref()

void reflock_unref ( reflock_t reflock)

Definition at line 1562 of file wepoll.c.

◆ reflock_unref_and_destroy()

void reflock_unref_and_destroy ( reflock_t reflock)

Definition at line 1572 of file wepoll.c.

◆ sock__afd_events_to_epoll_events()

static uint32_t sock__afd_events_to_epoll_events ( DWORD  afd_events)
inlinestatic

Definition at line 1751 of file wepoll.c.

◆ sock__alloc()

static sock_state_t* sock__alloc ( void  )
inlinestatic

Definition at line 1611 of file wepoll.c.

◆ sock__cancel_poll()

static int sock__cancel_poll ( sock_state_t sock_state)
inlinestatic

Definition at line 1623 of file wepoll.c.

◆ sock__delete()

static int sock__delete ( port_state_t port_state,
sock_state_t sock_state,
bool  force 
)
static

Definition at line 1676 of file wepoll.c.

◆ sock__epoll_events_to_afd_events()

static DWORD sock__epoll_events_to_afd_events ( uint32_t  epoll_events)
inlinestatic

Definition at line 1730 of file wepoll.c.

◆ sock__free()

static void sock__free ( sock_state_t sock_state)
inlinestatic

Definition at line 1618 of file wepoll.c.

◆ sock_delete()

void sock_delete ( port_state_t port_state,
sock_state_t sock_state 
)

Definition at line 1705 of file wepoll.c.

◆ sock_feed_event()

int sock_feed_event ( port_state_t port_state,
IO_STATUS_BLOCK io_status_block,
struct epoll_event ev 
)

Definition at line 1834 of file wepoll.c.

◆ sock_force_delete()

void sock_force_delete ( port_state_t port_state,
sock_state_t sock_state 
)

Definition at line 1709 of file wepoll.c.

◆ sock_new()

sock_state_t * sock_new ( port_state_t port_state,
SOCKET  socket 
)

Definition at line 1635 of file wepoll.c.

◆ sock_set_event()

int sock_set_event ( port_state_t port_state,
sock_state_t sock_state,
const struct epoll_event ev 
)

Definition at line 1713 of file wepoll.c.

◆ sock_state_from_queue_node()

sock_state_t * sock_state_from_queue_node ( queue_node_t queue_node)

Definition at line 1889 of file wepoll.c.

◆ sock_state_from_tree_node()

sock_state_t * sock_state_from_tree_node ( tree_node_t tree_node)

Definition at line 1897 of file wepoll.c.

◆ sock_state_to_queue_node()

queue_node_t * sock_state_to_queue_node ( sock_state_t sock_state)

Definition at line 1893 of file wepoll.c.

◆ sock_state_to_tree_node()

tree_node_t * sock_state_to_tree_node ( sock_state_t sock_state)

Definition at line 1901 of file wepoll.c.

◆ sock_update()

int sock_update ( port_state_t port_state,
sock_state_t sock_state 
)

Definition at line 1772 of file wepoll.c.

◆ tree__rotate_left()

static void tree__rotate_left ( tree_t tree,
tree_node_t node 
)
inlinestatic

Definition at line 2001 of file wepoll.c.

◆ tree__rotate_right()

static void tree__rotate_right ( tree_t tree,
tree_node_t node 
)
inlinestatic

Definition at line 2005 of file wepoll.c.

◆ tree_add()

int tree_add ( tree_t tree,
tree_node_t node,
uintptr_t  key 
)

Definition at line 2036 of file wepoll.c.

◆ tree_del()

void tree_del ( tree_t tree,
tree_node_t node 
)

Definition at line 2096 of file wepoll.c.

◆ tree_find()

tree_node_t * tree_find ( const tree_t tree,
uintptr_t  key 
)

Definition at line 2169 of file wepoll.c.

◆ tree_init()

void tree_init ( tree_t tree)

Definition at line 1972 of file wepoll.c.

◆ tree_node_init()

void tree_node_init ( tree_node_t node)

Definition at line 1976 of file wepoll.c.

◆ tree_root()

tree_node_t * tree_root ( const tree_t tree)

Definition at line 2182 of file wepoll.c.

◆ ts_tree__find_node()

static ts_tree_node_t* ts_tree__find_node ( ts_tree_t ts_tree,
uintptr_t  key 
)
inlinestatic

Definition at line 1925 of file wepoll.c.

◆ ts_tree_add()

int ts_tree_add ( ts_tree_t ts_tree,
ts_tree_node_t node,
uintptr_t  key 
)

Definition at line 1915 of file wepoll.c.

◆ ts_tree_del_and_ref()

ts_tree_node_t * ts_tree_del_and_ref ( ts_tree_t ts_tree,
uintptr_t  key 
)

Definition at line 1934 of file wepoll.c.

◆ ts_tree_find_and_ref()

ts_tree_node_t * ts_tree_find_and_ref ( ts_tree_t ts_tree,
uintptr_t  key 
)

Definition at line 1950 of file wepoll.c.

◆ ts_tree_init()

void ts_tree_init ( ts_tree_t rtl)

Definition at line 1905 of file wepoll.c.

◆ ts_tree_node_init()

void ts_tree_node_init ( ts_tree_node_t node)

Definition at line 1910 of file wepoll.c.

◆ ts_tree_node_unref()

void ts_tree_node_unref ( ts_tree_node_t node)

Definition at line 1964 of file wepoll.c.

◆ ts_tree_node_unref_and_destroy()

void ts_tree_node_unref_and_destroy ( ts_tree_node_t node)

Definition at line 1968 of file wepoll.c.

◆ ws__ioctl_get_bsp_socket()

static SOCKET ws__ioctl_get_bsp_socket ( SOCKET  socket,
DWORD  ioctl 
)
inlinestatic

Definition at line 2205 of file wepoll.c.

◆ ws_get_base_socket()

SOCKET ws_get_base_socket ( SOCKET  socket)

Definition at line 2223 of file wepoll.c.

◆ ws_global_init()

int ws_global_init ( void  )

Definition at line 2194 of file wepoll.c.

Variable Documentation

◆ afd__device_attributes

OBJECT_ATTRIBUTES afd__device_attributes
static
Initial value:

Definition at line 325 of file wepoll.c.

◆ afd__device_name

UNICODE_STRING afd__device_name
static
Initial value:
=
RTL_CONSTANT_STRING(L"\\Device\\Afd\\Wepoll")

Definition at line 322 of file wepoll.c.

◆ epoll__handle_tree

ts_tree_t epoll__handle_tree
static

Definition at line 548 of file wepoll.c.

◆ init__done

bool init__done = false
static

Definition at line 839 of file wepoll.c.

◆ init__once

INIT_ONCE init__once = INIT_ONCE_STATIC_INIT
static

Definition at line 840 of file wepoll.c.

◆ reflock__keyed_event

HANDLE reflock__keyed_event = NULL
static

Definition at line 1526 of file wepoll.c.

name
GLuint const GLchar * name
Definition: glcorearb.h:3055
RTL_CONSTANT_OBJECT_ATTRIBUTES
#define RTL_CONSTANT_OBJECT_ATTRIBUTES(ObjectName, Attributes)
Definition: wepoll.c:193
NULL
NULL
Definition: test_security_zap.cpp:405
google::protobuf.internal._parameterized.parameters
def parameters(*testcases)
Definition: _parameterized.py:315
tree_node::right
tree_node_t * right
Definition: wepoll.c:508
if
PHP_PROTO_OBJECT_FREE_END PHP_PROTO_OBJECT_DTOR_END if(!upb_strtable_init(&intern->table, UPB_CTYPE_UINT64))
Definition: php/ext/google/protobuf/map.c:232
error
Definition: cJSON.c:88
EPOLLOUT
#define EPOLLOUT
Definition: wepoll.c:55
nt__fn_ptr_cast_t
FARPROC nt__fn_ptr_cast_t
Definition: wepoll.c:879
EPOLLRDNORM
#define EPOLLRDNORM
Definition: wepoll.c:58
EPOLLWRBAND
#define EPOLLWRBAND
Definition: wepoll.c:61
EPOLLHUP
#define EPOLLHUP
Definition: wepoll.c:57
p
const char * p
Definition: gmock-matchers_test.cc:3863
tree_node::left
tree_node_t * left
Definition: wepoll.c:507
EPOLLMSG
#define EPOLLMSG
Definition: wepoll.c:62
EPOLLRDHUP
#define EPOLLRDHUP
Definition: wepoll.c:63
EPOLLWRNORM
#define EPOLLWRNORM
Definition: wepoll.c:60
tree_node::red
bool red
Definition: wepoll.c:511
tree_node
Definition: wepoll.c:506
afd__device_name
static UNICODE_STRING afd__device_name
Definition: wepoll.c:322
EPOLLERR
#define EPOLLERR
Definition: wepoll.c:56
tree_node::parent
tree_node_t * parent
Definition: wepoll.c:509
EPOLLPRI
#define EPOLLPRI
Definition: wepoll.c:54
tree::root
tree_node_t * root
Definition: wepoll.c:503
tree
Definition: wepoll.c:502
RTL_CONSTANT_STRING
#define RTL_CONSTANT_STRING(s)
Definition: wepoll.c:181
value
GLsizei const GLfloat * value
Definition: glcorearb.h:3093
EPOLLIN
#define EPOLLIN
Definition: wepoll.c:53


libaditof
Author(s):
autogenerated on Wed May 21 2025 02:07:05