2 // Copyright (c) 2020 Fraunhofer Institute for Applied Information Technology (FIT)
3 // Network Research Group (NET)
4 // Schloss Birlinghoven, 53754 Sankt Augustin, GERMANY
5 // Contact: support@wiback.org
7 // This file is part of the SENF code tree.
8 // It is licensed under the 3-clause BSD License (aka New BSD License).
9 // See LICENSE.txt in the top level directory for details or visit
10 // https://opensource.org/licenses/BSD-3-Clause
15 \brief Poller inline template implementation */
17 //#include "Poller.ih"
22 #define prefix_ inline
23 //-/////////////////////////////////////////////////////////////////////////////////////////////////
25 template <class Value>
26 prefix_ senf::scheduler::detail::Poller<Value>::Poller()
29 epollFd_ = epoll_create(NumEvents);
31 throw senf::SystemException("epoll_create");
34 template <class Value>
35 prefix_ senf::scheduler::detail::Poller<Value>::~Poller()
40 template <class Value>
41 prefix_ void senf::scheduler::detail::Poller<Value>::timeout(int t)
46 template <class Value>
47 prefix_ int senf::scheduler::detail::Poller<Value>::timeout()
53 template <class Value>
54 prefix_ typename senf::scheduler::detail::Poller<Value>::GetPollResult::result_type
55 senf::scheduler::detail::Poller<Value>::GetPollResult::operator()(epoll_event const & ev)
58 return std::make_pair(ev.events, static_cast<Value*>(ev.data.ptr));
61 //-/////////////////////////////////////////////////////////////////////////////////////////////////
69 // c-file-style: "senf"
70 // indent-tabs-mode: nil
71 // ispell-local-dictionary: "american"
72 // compile-command: "scons -u test"