Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
c2f23d92
Commit
c2f23d92
authored
Jan 29, 2018
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
system/EPollFD: add "noexcept"
parent
7027da3c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
EPollFD.cxx
src/system/EPollFD.cxx
+1
-1
EPollFD.hxx
src/system/EPollFD.hxx
+6
-6
No files found.
src/system/EPollFD.cxx
View file @
c2f23d92
...
...
@@ -30,7 +30,7 @@
#define EPOLL_CLOEXEC O_CLOEXEC
static
inline
int
epoll_create1
(
int
flags
)
epoll_create1
(
int
flags
)
noexcept
{
return
syscall
(
__NR_epoll_create1
,
flags
);
}
...
...
src/system/EPollFD.hxx
View file @
c2f23d92
...
...
@@ -40,7 +40,7 @@ class EPollFD {
public
:
EPollFD
();
~
EPollFD
()
{
~
EPollFD
()
noexcept
{
assert
(
fd
>=
0
);
::
close
(
fd
);
...
...
@@ -49,15 +49,15 @@ public:
EPollFD
(
const
EPollFD
&
other
)
=
delete
;
EPollFD
&
operator
=
(
const
EPollFD
&
other
)
=
delete
;
int
Wait
(
epoll_event
*
events
,
int
maxevents
,
int
timeout
)
{
int
Wait
(
epoll_event
*
events
,
int
maxevents
,
int
timeout
)
noexcept
{
return
::
epoll_wait
(
fd
,
events
,
maxevents
,
timeout
);
}
bool
Control
(
int
op
,
int
_fd
,
epoll_event
*
event
)
{
bool
Control
(
int
op
,
int
_fd
,
epoll_event
*
event
)
noexcept
{
return
::
epoll_ctl
(
fd
,
op
,
_fd
,
event
)
>=
0
;
}
bool
Add
(
int
_fd
,
uint32_t
events
,
void
*
ptr
)
{
bool
Add
(
int
_fd
,
uint32_t
events
,
void
*
ptr
)
noexcept
{
epoll_event
e
;
e
.
events
=
events
;
e
.
data
.
ptr
=
ptr
;
...
...
@@ -65,7 +65,7 @@ public:
return
Control
(
EPOLL_CTL_ADD
,
_fd
,
&
e
);
}
bool
Modify
(
int
_fd
,
uint32_t
events
,
void
*
ptr
)
{
bool
Modify
(
int
_fd
,
uint32_t
events
,
void
*
ptr
)
noexcept
{
epoll_event
e
;
e
.
events
=
events
;
e
.
data
.
ptr
=
ptr
;
...
...
@@ -73,7 +73,7 @@ public:
return
Control
(
EPOLL_CTL_MOD
,
_fd
,
&
e
);
}
bool
Remove
(
int
_fd
)
{
bool
Remove
(
int
_fd
)
noexcept
{
return
Control
(
EPOLL_CTL_DEL
,
_fd
,
nullptr
);
}
};
...
...
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