Skip to content

Commit

Permalink
cmake: Export missing symbols for win32
Browse files Browse the repository at this point in the history
  • Loading branch information
azat committed Mar 14, 2017
1 parent 30f2a96 commit 48ead58
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
9 changes: 9 additions & 0 deletions evthread-internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -185,14 +185,23 @@ EVLOCK_TRY_LOCK_(void *lock)
#elif ! defined(EVENT__DISABLE_THREAD_SUPPORT)

unsigned long evthreadimpl_get_id_(void);
EVENT2_EXPORT_SYMBOL
int evthreadimpl_is_lock_debugging_enabled_(void);
EVENT2_EXPORT_SYMBOL
void *evthreadimpl_lock_alloc_(unsigned locktype);
EVENT2_EXPORT_SYMBOL
void evthreadimpl_lock_free_(void *lock, unsigned locktype);
EVENT2_EXPORT_SYMBOL
int evthreadimpl_lock_lock_(unsigned mode, void *lock);
EVENT2_EXPORT_SYMBOL
int evthreadimpl_lock_unlock_(unsigned mode, void *lock);
EVENT2_EXPORT_SYMBOL
void *evthreadimpl_cond_alloc_(unsigned condtype);
EVENT2_EXPORT_SYMBOL
void evthreadimpl_cond_free_(void *cond);
EVENT2_EXPORT_SYMBOL
int evthreadimpl_cond_signal_(void *cond, int broadcast);
EVENT2_EXPORT_SYMBOL
int evthreadimpl_cond_wait_(void *cond, void *lock, const struct timeval *tv);
int evthreadimpl_locking_enabled_(void);

Expand Down
13 changes: 13 additions & 0 deletions iocp-internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand All @@ -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) */
Expand All @@ -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.
Expand All @@ -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);

Expand All @@ -169,15 +178,18 @@ 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. */
Expand All @@ -186,6 +198,7 @@ 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);

Expand Down
1 change: 1 addition & 0 deletions util-internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,7 @@ void evutil_free_secure_rng_globals_(void);
void evutil_free_globals_(void);

#ifdef _WIN32
EVENT2_EXPORT_SYMBOL
HMODULE evutil_load_windows_system_library_(const TCHAR *library_name);
#endif

Expand Down

0 comments on commit 48ead58

Please sign in to comment.