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
dd461400
Commit
dd461400
authored
Aug 22, 2018
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
system/EPollFD: rename to EpollFD
parent
b1390ec2
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
21 deletions
+21
-21
Makefile.am
Makefile.am
+2
-2
PollGroup.hxx
src/event/PollGroup.hxx
+3
-3
PollGroupEpoll.hxx
src/event/PollGroupEpoll.hxx
+9
-9
EpollFD.cxx
src/system/EpollFD.cxx
+2
-2
EpollFD.hxx
src/system/EpollFD.hxx
+5
-5
No files found.
Makefile.am
View file @
dd461400
...
...
@@ -619,7 +619,7 @@ libsystem_a_SOURCES = \
src/system/EventPipe.cxx src/system/EventPipe.hxx
\
src/system/EventFD.cxx src/system/EventFD.hxx
\
src/system/SignalFD.cxx src/system/SignalFD.hxx
\
src/system/E
PollFD.cxx src/system/EP
ollFD.hxx
\
src/system/E
pollFD.cxx src/system/Ep
ollFD.hxx
\
src/system/PeriodClock.hxx
\
src/system/Clock.cxx src/system/Clock.hxx
...
...
@@ -628,7 +628,7 @@ libsystem_a_SOURCES = \
libevent_a_SOURCES
=
\
src/event/WakeFD.hxx
\
src/event/PollGroup.hxx
\
src/event/PollGroupE
P
oll.hxx
\
src/event/PollGroupE
p
oll.hxx
\
src/event/PollGroupPoll.hxx src/event/PollGroupPoll.cxx
\
src/event/PollGroupWinSelect.hxx src/event/PollGroupWinSelect.cxx
\
src/event/PollResultGeneric.hxx
\
...
...
src/event/PollGroup.hxx
View file @
dd461400
...
...
@@ -21,9 +21,9 @@
#define MPD_EVENT_POLLGROUP_HXX
#ifdef USE_EPOLL
#include "PollGroupE
P
oll.hxx"
typedef
PollResultE
P
oll
PollResult
;
typedef
PollGroupE
Poll
PollGroup
;
#include "PollGroupE
p
oll.hxx"
typedef
PollResultE
p
oll
PollResult
;
typedef
PollGroupE
poll
PollGroup
;
#endif
#ifdef USE_WINSELECT
...
...
src/event/PollGroupE
P
oll.hxx
→
src/event/PollGroupE
p
oll.hxx
View file @
dd461400
...
...
@@ -23,14 +23,14 @@
#include "check.h"
#include "util/Compiler.h"
#include "system/E
P
ollFD.hxx"
#include "system/E
p
ollFD.hxx"
#include <array>
#include <algorithm>
class
PollResultE
P
oll
class
PollResultE
p
oll
{
friend
class
PollGroupE
P
oll
;
friend
class
PollGroupE
p
oll
;
std
::
array
<
epoll_event
,
16
>
events
;
size_t
n_events
=
0
;
...
...
@@ -59,21 +59,21 @@ public:
}
};
class
PollGroupE
P
oll
class
PollGroupE
p
oll
{
E
P
ollFD
epoll
;
E
p
ollFD
epoll
;
PollGroupE
Poll
(
PollGroupEP
oll
&
)
=
delete
;
PollGroupE
Poll
&
operator
=
(
PollGroupEP
oll
&
)
=
delete
;
PollGroupE
poll
(
PollGroupEp
oll
&
)
=
delete
;
PollGroupE
poll
&
operator
=
(
PollGroupEp
oll
&
)
=
delete
;
public
:
static
constexpr
unsigned
READ
=
EPOLLIN
;
static
constexpr
unsigned
WRITE
=
EPOLLOUT
;
static
constexpr
unsigned
ERROR
=
EPOLLERR
;
static
constexpr
unsigned
HANGUP
=
EPOLLHUP
;
PollGroupE
P
oll
()
=
default
;
PollGroupE
p
oll
()
=
default
;
void
ReadEvents
(
PollResultE
P
oll
&
result
,
int
timeout_ms
)
noexcept
{
void
ReadEvents
(
PollResultE
p
oll
&
result
,
int
timeout_ms
)
noexcept
{
int
ret
=
epoll
.
Wait
(
result
.
events
.
data
(),
result
.
events
.
size
(),
timeout_ms
);
result
.
n_events
=
std
::
max
(
0
,
ret
);
...
...
src/system/E
P
ollFD.cxx
→
src/system/E
p
ollFD.cxx
View file @
dd461400
...
...
@@ -19,10 +19,10 @@
#include "config.h"
#ifdef USE_EPOLL
#include "E
P
ollFD.hxx"
#include "E
p
ollFD.hxx"
#include "Error.hxx"
E
PollFD
::
EP
ollFD
()
E
pollFD
::
Ep
ollFD
()
:
fd
(
::
epoll_create1
(
EPOLL_CLOEXEC
))
{
if
(
fd
<
0
)
...
...
src/system/E
P
ollFD.hxx
→
src/system/E
p
ollFD.hxx
View file @
dd461400
...
...
@@ -32,23 +32,23 @@ struct epoll_event;
/**
* A class that wraps Linux epoll.
*/
class
E
P
ollFD
{
class
E
p
ollFD
{
const
int
fd
;
public
:
/**
* Throws on error.
*/
E
P
ollFD
();
E
p
ollFD
();
~
E
P
ollFD
()
noexcept
{
~
E
p
ollFD
()
noexcept
{
assert
(
fd
>=
0
);
::
close
(
fd
);
}
E
PollFD
(
const
EP
ollFD
&
other
)
=
delete
;
E
PollFD
&
operator
=
(
const
EP
ollFD
&
other
)
=
delete
;
E
pollFD
(
const
Ep
ollFD
&
other
)
=
delete
;
E
pollFD
&
operator
=
(
const
Ep
ollFD
&
other
)
=
delete
;
int
Wait
(
epoll_event
*
events
,
int
maxevents
,
int
timeout
)
noexcept
{
return
::
epoll_wait
(
fd
,
events
,
maxevents
,
timeout
);
...
...
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