diff options
| author | Patrick Venture <venture@google.com> | 2018-12-14 13:56:15 -0800 |
|---|---|---|
| committer | Patrick Venture <venture@google.com> | 2019-01-04 16:20:14 -0800 |
| commit | 7b78aa2ce13d866d0b1ac60813ca1cfb36f61b45 (patch) | |
| tree | 57f06e66479c1f9b9bc776243f34f23bbd597a98 /internal | |
| parent | 339dece8f08f41f1eeaf2cb59797423c47eb9a1f (diff) | |
| download | phosphor-ipmi-flash-7b78aa2ce13d866d0b1ac60813ca1cfb36f61b45.tar.gz phosphor-ipmi-flash-7b78aa2ce13d866d0b1ac60813ca1cfb36f61b45.zip | |
internal: add poll() method
Add the poll() method to the internal syscall interface.
Change-Id: I6bf8b59e582214c7e607a8041a9573ef24dd5493
Signed-off-by: Patrick Venture <venture@google.com>
Diffstat (limited to 'internal')
| -rw-r--r-- | internal/sys.cpp | 5 | ||||
| -rw-r--r-- | internal/sys.hpp | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/internal/sys.cpp b/internal/sys.cpp index 7e765a9..f6a686e 100644 --- a/internal/sys.cpp +++ b/internal/sys.cpp @@ -55,6 +55,11 @@ int SysImpl::ioctl(int fd, unsigned long request, void* param) const return ::ioctl(fd, request, param); } +int SysImpl::poll(struct pollfd* fds, nfds_t nfds, int timeout) const +{ + return ::poll(fds, nfds, timeout); +} + SysImpl sys_impl; } // namespace internal diff --git a/internal/sys.hpp b/internal/sys.hpp index c013d3d..98221c3 100644 --- a/internal/sys.hpp +++ b/internal/sys.hpp @@ -7,6 +7,7 @@ * other pieces. */ +#include <poll.h> #include <sys/mman.h> #include <cinttypes> @@ -31,6 +32,7 @@ class Sys virtual int munmap(void* addr, size_t length) const = 0; virtual int getpagesize() const = 0; virtual int ioctl(int fd, unsigned long request, void* param) const = 0; + virtual int poll(struct pollfd* fds, nfds_t nfds, int timeout) const = 0; }; /** @@ -48,6 +50,7 @@ class SysImpl : public Sys int munmap(void* addr, size_t length) const override; int getpagesize() const override; int ioctl(int fd, unsigned long request, void* param) const override; + int poll(struct pollfd* fds, nfds_t nfds, int timeout) const override; }; /** @brief Default instantiation of sys */ |

