summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2020-11-25 11:12:09 +0100
committerVladislav Vaintroub <wlad@mariadb.com>2020-11-25 13:07:08 +0100
commitc130c60b2bb985bd15137ca471d15f690ef12dd7 (patch)
tree300fab53573a9110119fdb68d4b6114f07548e39
parent78df9e37a65bfdd32ec721a9152d5c94cbe89217 (diff)
downloadmariadb-git-c130c60b2bb985bd15137ca471d15f690ef12dd7.tar.gz
Cleanup. Provide accurate comment on my_getevents().
-rw-r--r--tpool/aio_linux.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/tpool/aio_linux.cc b/tpool/aio_linux.cc
index 03872df5ac7..c335c54964d 100644
--- a/tpool/aio_linux.cc
+++ b/tpool/aio_linux.cc
@@ -22,8 +22,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 - 1301 USA*/
# include <libaio.h>
# include <sys/syscall.h>
-/** A simpler alternative to io_getevents(), without
-aio_ring_is_empty() that may trigger SIGSEGV */
+/*
+ A hack, which so far seems to allow allow getevents thread to be interrupted
+ by io_destroy() from another thread
+
+ libaio's io_getevent() would sometimes crash when attempting this feat,
+ thus the raw syscall.
+
+*/
static int my_getevents(io_context_t ctx, long min_nr, long nr, io_event *ev)
{
int saved_errno= errno;
@@ -37,6 +43,8 @@ static int my_getevents(io_context_t ctx, long min_nr, long nr, io_event *ev)
return ret;
}
#endif
+
+
/*
Linux AIO implementation, based on native AIO.
Needs libaio.h and -laio at the compile time.