Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
2c37ace1
Commit
2c37ace1
authored
Feb 19, 2013
by
Vladislav Vaintroub
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-4174 - Use kqueue for threadpool implementation on more BSD variants than just FreeBSD
or OSX - i.e NetBSD, OpenBSD, DragonFly, etc.
parent
4e9b5ff5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
7 deletions
+12
-7
cmake/os/WindowsCache.cmake
cmake/os/WindowsCache.cmake
+1
-0
config.h.cmake
config.h.cmake
+1
-0
configure.cmake
configure.cmake
+5
-0
sql/threadpool_unix.cc
sql/threadpool_unix.cc
+5
-7
No files found.
cmake/os/WindowsCache.cmake
View file @
2c37ace1
...
@@ -267,6 +267,7 @@ SET(HAVE_SYNCH_H CACHE INTERNAL "")
...
@@ -267,6 +267,7 @@ SET(HAVE_SYNCH_H CACHE INTERNAL "")
SET
(
HAVE_SYSENT_H CACHE INTERNAL
""
)
SET
(
HAVE_SYSENT_H CACHE INTERNAL
""
)
SET
(
HAVE_SYS_CDEFS_H CACHE INTERNAL
""
)
SET
(
HAVE_SYS_CDEFS_H CACHE INTERNAL
""
)
SET
(
HAVE_SYS_DIR_H CACHE INTERNAL
""
)
SET
(
HAVE_SYS_DIR_H CACHE INTERNAL
""
)
SET
(
HAVE_SYS_EVENT_H CACHE INTERNAL
""
)
SET
(
HAVE_SYS_ERRLIST CACHE INTERNAL
""
)
SET
(
HAVE_SYS_ERRLIST CACHE INTERNAL
""
)
SET
(
HAVE_SYS_FILE_H CACHE INTERNAL
""
)
SET
(
HAVE_SYS_FILE_H CACHE INTERNAL
""
)
SET
(
HAVE_SYS_FPU_H CACHE INTERNAL
""
)
SET
(
HAVE_SYS_FPU_H CACHE INTERNAL
""
)
...
...
config.h.cmake
View file @
2c37ace1
...
@@ -45,6 +45,7 @@
...
@@ -45,6 +45,7 @@
#cmakedefine HAVE_IA64INTRIN_H 1
#cmakedefine HAVE_IA64INTRIN_H 1
#cmakedefine HAVE_IEEEFP_H 1
#cmakedefine HAVE_IEEEFP_H 1
#cmakedefine HAVE_INTTYPES_H 1
#cmakedefine HAVE_INTTYPES_H 1
#cmakedefine HAVE_KQUEUE 1
#cmakedefine HAVE_LIMITS_H 1
#cmakedefine HAVE_LIMITS_H 1
#cmakedefine HAVE_LINUX_UNISTD_H 1
#cmakedefine HAVE_LINUX_UNISTD_H 1
#cmakedefine HAVE_LOCALE_H 1
#cmakedefine HAVE_LOCALE_H 1
...
...
configure.cmake
View file @
2c37ace1
...
@@ -217,6 +217,7 @@ CHECK_INCLUDE_FILES (sched.h HAVE_SCHED_H)
...
@@ -217,6 +217,7 @@ CHECK_INCLUDE_FILES (sched.h HAVE_SCHED_H)
CHECK_INCLUDE_FILES
(
select.h HAVE_SELECT_H
)
CHECK_INCLUDE_FILES
(
select.h HAVE_SELECT_H
)
CHECK_INCLUDE_FILES
(
semaphore.h HAVE_SEMAPHORE_H
)
CHECK_INCLUDE_FILES
(
semaphore.h HAVE_SEMAPHORE_H
)
CHECK_INCLUDE_FILES
(
"sys/types.h;sys/dir.h"
HAVE_SYS_DIR_H
)
CHECK_INCLUDE_FILES
(
"sys/types.h;sys/dir.h"
HAVE_SYS_DIR_H
)
CHECK_INCLUDE_FILES
(
"sys/types.h;sys/event.h"
HAVE_SYS_EVENT_H
)
CHECK_INCLUDE_FILES
(
sys/ndir.h HAVE_SYS_NDIR_H
)
CHECK_INCLUDE_FILES
(
sys/ndir.h HAVE_SYS_NDIR_H
)
CHECK_INCLUDE_FILES
(
sys/pte.h HAVE_SYS_PTE_H
)
CHECK_INCLUDE_FILES
(
sys/pte.h HAVE_SYS_PTE_H
)
CHECK_INCLUDE_FILES
(
stddef.h HAVE_STDDEF_H
)
CHECK_INCLUDE_FILES
(
stddef.h HAVE_STDDEF_H
)
...
@@ -466,6 +467,10 @@ CHECK_FUNCTION_EXISTS (memalign HAVE_MEMALIGN)
...
@@ -466,6 +467,10 @@ CHECK_FUNCTION_EXISTS (memalign HAVE_MEMALIGN)
CHECK_FUNCTION_EXISTS
(
chown HAVE_CHOWN
)
CHECK_FUNCTION_EXISTS
(
chown HAVE_CHOWN
)
CHECK_FUNCTION_EXISTS
(
nl_langinfo HAVE_NL_LANGINFO
)
CHECK_FUNCTION_EXISTS
(
nl_langinfo HAVE_NL_LANGINFO
)
IF
(
HAVE_SYS_EVENT_H
)
CHECK_FUNCTION_EXISTS
(
kqueue HAVE_KQUEUE
)
ENDIF
()
#--------------------------------------------------------------------
#--------------------------------------------------------------------
# Support for WL#2373 (Use cycle counter for timing)
# Support for WL#2373 (Use cycle counter for timing)
#--------------------------------------------------------------------
#--------------------------------------------------------------------
...
...
sql/threadpool_unix.cc
View file @
2c37ace1
...
@@ -29,14 +29,14 @@
...
@@ -29,14 +29,14 @@
#ifdef __linux__
#ifdef __linux__
#include <sys/epoll.h>
#include <sys/epoll.h>
typedef
struct
epoll_event
native_event
;
typedef
struct
epoll_event
native_event
;
#endif
#elif defined(HAVE_KQUEUE)
#if defined (__FreeBSD__) || defined (__APPLE__)
#include <sys/event.h>
#include <sys/event.h>
typedef
struct
kevent
native_event
;
typedef
struct
kevent
native_event
;
#endif
#elif defined (__sun)
#if defined (__sun)
#include <port.h>
#include <port.h>
typedef
port_event_t
native_event
;
typedef
port_event_t
native_event
;
#else
#error threadpool is not available on this platform
#endif
#endif
/** Maximum number of native events a listener can read in one go */
/** 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)
...
@@ -285,7 +285,7 @@ static void *native_event_get_userdata(native_event *event)
return
event
->
data
.
ptr
;
return
event
->
data
.
ptr
;
}
}
#elif defined
(__FreeBSD__) || defined (__APPLE__
)
#elif defined
(HAVE_KQUEUE
)
int
io_poll_create
()
int
io_poll_create
()
{
{
return
kqueue
();
return
kqueue
();
...
@@ -386,8 +386,6 @@ static void* native_event_get_userdata(native_event *event)
...
@@ -386,8 +386,6 @@ static void* native_event_get_userdata(native_event *event)
{
{
return
event
->
portev_user
;
return
event
->
portev_user
;
}
}
#else
#error not ported yet to this OS
#endif
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment