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
54ee0e28
Commit
54ee0e28
authored
Oct 12, 2020
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
event/PollGroup: check _WIN32 instead of USE_WINSELECT
parent
92fc53eb
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
27 deletions
+19
-27
meson.build
meson.build
+1
-5
PollGroup.hxx
src/event/PollGroup.hxx
+10
-8
PollGroupPoll.cxx
src/event/PollGroupPoll.cxx
+0
-6
PollGroupWinSelect.cxx
src/event/PollGroupWinSelect.cxx
+0
-6
meson.build
src/event/meson.build
+8
-2
No files found.
meson.build
View file @
54ee0e28
...
...
@@ -172,12 +172,8 @@ conf.set('HAVE_PRCTL', is_linux)
conf.set('USE_EVENTFD', is_linux and get_option('eventfd'))
conf.set('USE_SIGNALFD', is_linux and get_option('signalfd'))
if is_windows
conf.set('USE_WINSELECT', true)
elif is_linux and get_option('epoll')
if is_linux and get_option('epoll')
conf.set('USE_EPOLL', true)
else
conf.set('USE_POLL', true)
endif
if not get_option('syslog').disabled()
...
...
src/event/PollGroup.hxx
View file @
54ee0e28
...
...
@@ -22,22 +22,24 @@
#include "config.h"
#ifdef USE_EPOLL
#include "PollGroupEpoll.hxx"
typedef
PollResultEpoll
PollResult
;
typedef
PollGroupEpoll
PollGroup
;
#endif
#ifdef _WIN32
#ifdef USE_WINSELECT
#include "PollGroupWinSelect.hxx"
typedef
PollResultGeneric
PollResult
;
typedef
PollGroupWinSelect
PollGroup
;
#endif
#ifdef USE_POLL
#elif defined(USE_EPOLL)
#include "PollGroupEpoll.hxx"
typedef
PollResultEpoll
PollResult
;
typedef
PollGroupEpoll
PollGroup
;
#else
#include "PollGroupPoll.hxx"
typedef
PollResultGeneric
PollResult
;
typedef
PollGroupPoll
PollGroup
;
#endif
#endif
src/event/PollGroupPoll.cxx
View file @
54ee0e28
...
...
@@ -17,10 +17,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "config.h"
#ifdef USE_POLL
#include "PollGroupPoll.hxx"
#include <cassert>
...
...
@@ -89,5 +85,3 @@ PollGroupPoll::ReadEvents(PollResultGeneric &result, int timeout_ms) noexcept
}
}
}
#endif
src/event/PollGroupWinSelect.cxx
View file @
54ee0e28
...
...
@@ -17,10 +17,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "config.h"
#ifdef USE_WINSELECT
#include "PollGroupWinSelect.hxx"
static
constexpr
int
EVENT_READ
=
0
;
...
...
@@ -165,5 +161,3 @@ PollGroupWinSelect::ReadEvents(PollResultGeneric &result,
i
.
second
.
events
=
0
;
}
}
#endif
src/event/meson.build
View file @
54ee0e28
...
...
@@ -4,10 +4,16 @@ if uring_dep.found()
event_sources += 'UringManager.cxx'
endif
if is_windows
event_sources += 'PollGroupWinSelect.cxx'
elif is_linux and get_option('epoll')
# epoll support is header-only
else
event_sources += 'PollGroupPoll.cxx'
endif
event = static_library(
'event',
'PollGroupPoll.cxx',
'PollGroupWinSelect.cxx',
'SignalMonitor.cxx',
'TimerEvent.cxx',
'IdleMonitor.cxx',
...
...
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