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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
c130c60b
Commit
c130c60b
authored
Nov 25, 2020
by
Vladislav Vaintroub
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup. Provide accurate comment on my_getevents().
parent
78df9e37
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
tpool/aio_linux.cc
tpool/aio_linux.cc
+10
-2
No files found.
tpool/aio_linux.cc
View file @
c130c60b
...
@@ -22,8 +22,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 - 1301 USA*/
...
@@ -22,8 +22,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 - 1301 USA*/
# include <libaio.h>
# include <libaio.h>
# include <sys/syscall.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
)
static
int
my_getevents
(
io_context_t
ctx
,
long
min_nr
,
long
nr
,
io_event
*
ev
)
{
{
int
saved_errno
=
errno
;
int
saved_errno
=
errno
;
...
@@ -37,6 +43,8 @@ static int my_getevents(io_context_t ctx, long min_nr, long nr, io_event *ev)
...
@@ -37,6 +43,8 @@ static int my_getevents(io_context_t ctx, long min_nr, long nr, io_event *ev)
return
ret
;
return
ret
;
}
}
#endif
#endif
/*
/*
Linux AIO implementation, based on native AIO.
Linux AIO implementation, based on native AIO.
Needs libaio.h and -laio at the compile time.
Needs libaio.h and -laio at the compile time.
...
...
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