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 IdleEvent internal header */
17 #ifndef IH_SENF_Scheduler_IdleEvent_
18 #define IH_SENF_Scheduler_IdleEvent_ 1
21 #include <senf/Utils/singleton.hh>
23 //-/////////////////////////////////////////////////////////////////////////////////////////////////
32 class IdleEventDispatcher
33 : public singleton<IdleEventDispatcher>
36 using singleton<IdleEventDispatcher>::instance;
37 using singleton<IdleEventDispatcher>::alive;
39 void add(IdleEvent & event);
40 void remove(IdleEvent & event);
44 // Called by PollTimerSource
51 IdleEventDispatcher();
52 ~IdleEventDispatcher();
54 typedef boost::intrusive::list< IdleEvent,
55 boost::intrusive::constant_time_size<false>,
56 boost::intrusive::base_hook<IdleEventListBase> > EventList;
61 friend void senf::scheduler::restart();
62 friend class singleton<IdleEventDispatcher>;
67 //-/////////////////////////////////////////////////////////////////////////////////////////////////
75 // c-file-style: "senf"
76 // indent-tabs-mode: nil
77 // ispell-local-dictionary: "american"
78 // compile-command: "scons -u test"