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
7ad440ca
Commit
7ad440ca
authored
Aug 20, 2018
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
net/SocketDescriptor: make eventfd() and signalfd() mandatory on Linux
parent
13b3e9e7
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
27 deletions
+7
-27
EventFD.cxx
src/system/EventFD.cxx
+1
-1
FileDescriptor.cxx
src/system/FileDescriptor.cxx
+2
-16
FileDescriptor.hxx
src/system/FileDescriptor.hxx
+2
-8
SignalFD.cxx
src/system/SignalFD.cxx
+2
-2
No files found.
src/system/EventFD.cxx
View file @
7ad440ca
...
...
@@ -18,7 +18,7 @@
*/
#include "config.h"
#ifdef
USE_EVENTFD
#ifdef
__linux__
#include "EventFD.hxx"
#include "system/Error.hxx"
#include "util/Compiler.h"
...
...
src/system/FileDescriptor.cxx
View file @
7ad440ca
...
...
@@ -37,15 +37,9 @@
#include <poll.h>
#endif
#ifdef
USE_EVENTFD
#ifdef
__linux__
#include <sys/eventfd.h>
#endif
#ifdef USE_SIGNALFD
#include <sys/signalfd.h>
#endif
#ifdef __linux__
#include <sys/inotify.h>
#endif
...
...
@@ -222,7 +216,7 @@ FileDescriptor::CheckDuplicate(int new_fd) noexcept
#endif
#ifdef
USE_EVENTFD
#ifdef
__linux__
bool
FileDescriptor
::
CreateEventFD
(
unsigned
initval
)
noexcept
...
...
@@ -231,10 +225,6 @@ FileDescriptor::CreateEventFD(unsigned initval) noexcept
return
fd
>=
0
;
}
#endif
#ifdef USE_SIGNALFD
bool
FileDescriptor
::
CreateSignalFD
(
const
sigset_t
*
mask
)
noexcept
{
...
...
@@ -246,10 +236,6 @@ FileDescriptor::CreateSignalFD(const sigset_t *mask) noexcept
return
true
;
}
#endif
#ifdef __linux__
bool
FileDescriptor
::
CreateInotify
()
noexcept
{
...
...
src/system/FileDescriptor.hxx
View file @
7ad440ca
...
...
@@ -39,7 +39,7 @@
#include <unistd.h>
#include <sys/types.h>
#ifdef
USE_SIGNALFD
#ifdef
__linux__
#include <signal.h>
#endif
...
...
@@ -181,15 +181,9 @@ public:
bool
CheckDuplicate
(
int
new_fd
)
noexcept
;
#endif
#ifdef
USE_EVENTFD
#ifdef
__linux__
bool
CreateEventFD
(
unsigned
initval
=
0
)
noexcept
;
#endif
#ifdef USE_SIGNALFD
bool
CreateSignalFD
(
const
sigset_t
*
mask
)
noexcept
;
#endif
#ifdef __linux__
bool
CreateInotify
()
noexcept
;
#endif
...
...
src/system/SignalFD.cxx
View file @
7ad440ca
...
...
@@ -18,7 +18,7 @@
*/
#include "config.h"
#ifdef
USE_SIGNALFD
#ifdef
__linux__
#include "SignalFD.hxx"
#include "Error.hxx"
...
...
@@ -43,4 +43,4 @@ SignalFD::Read() noexcept
:
-
1
;
}
#endif
/*
USE_SIGNALFD
*/
#endif
/*
__linux__
*/
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