diff options
author | Vladislav Vaintroub <vvaintroub@pcbsd> | 2013-02-19 23:46:52 +0100 |
---|---|---|
committer | Vladislav Vaintroub <vvaintroub@pcbsd> | 2013-02-19 23:46:52 +0100 |
commit | 2c37ace13164b0a261fd850a0d11f5af539e657a (patch) | |
tree | 30e0fbf68a7f8caad01816684f09c5c1d92cbc37 /sql/threadpool_unix.cc | |
parent | 4e9b5ff5437164b8061cdab5a42b48c07e511516 (diff) | |
download | mariadb-git-2c37ace13164b0a261fd850a0d11f5af539e657a.tar.gz |
MDEV-4174 - Use kqueue for threadpool implementation on more BSD variants than just FreeBSD
or OSX - i.e NetBSD, OpenBSD, DragonFly, etc.
Diffstat (limited to 'sql/threadpool_unix.cc')
-rw-r--r-- | sql/threadpool_unix.cc | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/sql/threadpool_unix.cc b/sql/threadpool_unix.cc index e324fa697da..94251660e37 100644 --- a/sql/threadpool_unix.cc +++ b/sql/threadpool_unix.cc @@ -29,14 +29,14 @@ #ifdef __linux__ #include <sys/epoll.h> typedef struct epoll_event native_event; -#endif -#if defined (__FreeBSD__) || defined (__APPLE__) +#elif defined(HAVE_KQUEUE) #include <sys/event.h> typedef struct kevent native_event; -#endif -#if defined (__sun) +#elif defined (__sun) #include <port.h> typedef port_event_t native_event; +#else +#error threadpool is not available on this platform #endif /** Maximum number of native events a listener can read in one go */ @@ -285,7 +285,7 @@ static void *native_event_get_userdata(native_event *event) return event->data.ptr; } -#elif defined (__FreeBSD__) || defined (__APPLE__) +#elif defined(HAVE_KQUEUE) int io_poll_create() { return kqueue(); @@ -386,8 +386,6 @@ static void* native_event_get_userdata(native_event *event) { return event->portev_user; } -#else -#error not ported yet to this OS #endif |