diff options
author | Cy Schubert <cy@FreeBSD.org> | 2023-11-14 23:02:42 +0000 |
---|---|---|
committer | Cy Schubert <cy@FreeBSD.org> | 2023-11-14 23:02:42 +0000 |
commit | 5223d1d95fddcef6f9a36e264a5800bd907ade8b (patch) | |
tree | 818b1eba912c588e39058586485699385c3179fe /iocp-internal.h | |
parent | cbc620a473ce23d882ba3e9f91ec0c6c12dcd239 (diff) |
Diffstat (limited to 'iocp-internal.h')
-rw-r--r-- | iocp-internal.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/iocp-internal.h b/iocp-internal.h index 93dbe2b1a454..21e0e0af6807 100644 --- a/iocp-internal.h +++ b/iocp-internal.h @@ -92,6 +92,7 @@ struct event_iocp_port { HANDLE *shutdownSemaphore; }; +EVENT2_EXPORT_SYMBOL const struct win32_extension_fns *event_get_win32_extension_fns_(void); #else /* Dummy definition so we can test-compile more things on unix. */ @@ -106,12 +107,14 @@ struct event_overlapped { @param cb The callback that should be invoked once the IO operation has finished. */ +EVENT2_EXPORT_SYMBOL void event_overlapped_init_(struct event_overlapped *, iocp_callback cb); /** Allocate and return a new evbuffer that supports overlapped IO on a given socket. The socket must be associated with an IO completion port using event_iocp_port_associate_. */ +EVENT2_EXPORT_SYMBOL struct evbuffer *evbuffer_overlapped_new_(evutil_socket_t fd); /** XXXX Document (nickm) */ @@ -131,6 +134,7 @@ void evbuffer_overlapped_set_fd_(struct evbuffer *buf, evutil_socket_t fd); @param ol Overlapped object with associated completion callback. @return 0 on success, -1 on error. */ +EVENT2_EXPORT_SYMBOL int evbuffer_launch_read_(struct evbuffer *buf, size_t n, struct event_overlapped *ol); /** Start writing data from the start of an evbuffer. @@ -145,21 +149,26 @@ int evbuffer_launch_read_(struct evbuffer *buf, size_t n, struct event_overlappe @param ol Overlapped object with associated completion callback. @return 0 on success, -1 on error. */ +EVENT2_EXPORT_SYMBOL int evbuffer_launch_write_(struct evbuffer *buf, ev_ssize_t n, struct event_overlapped *ol); /** XXX document */ +EVENT2_EXPORT_SYMBOL void evbuffer_commit_read_(struct evbuffer *, ev_ssize_t); +EVENT2_EXPORT_SYMBOL void evbuffer_commit_write_(struct evbuffer *, ev_ssize_t); /** Create an IOCP, and launch its worker threads. Internal use only. This interface is unstable, and will change. */ +EVENT2_EXPORT_SYMBOL struct event_iocp_port *event_iocp_port_launch_(int n_cpus); /** Associate a file descriptor with an iocp, such that overlapped IO on the fd will happen on one of the iocp's worker threads. */ +EVENT2_EXPORT_SYMBOL int event_iocp_port_associate_(struct event_iocp_port *port, evutil_socket_t fd, ev_uintptr_t key); @@ -169,22 +178,27 @@ int event_iocp_port_associate_(struct event_iocp_port *port, evutil_socket_t fd, 0. Otherwise, return -1. If you get a -1 return value, it is safe to call this function again. */ +EVENT2_EXPORT_SYMBOL int event_iocp_shutdown_(struct event_iocp_port *port, long waitMsec); /* FIXME document. */ +EVENT2_EXPORT_SYMBOL int event_iocp_activate_overlapped_(struct event_iocp_port *port, struct event_overlapped *o, ev_uintptr_t key, ev_uint32_t n_bytes); struct event_base; /* FIXME document. */ +EVENT2_EXPORT_SYMBOL struct event_iocp_port *event_base_get_iocp_(struct event_base *base); /* FIXME document. */ +EVENT2_EXPORT_SYMBOL int event_base_start_iocp_(struct event_base *base, int n_cpus); void event_base_stop_iocp_(struct event_base *base); /* FIXME document. */ +EVENT2_EXPORT_SYMBOL struct bufferevent *bufferevent_async_new_(struct event_base *base, evutil_socket_t fd, int options); |