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
947856ca
Commit
947856ca
authored
Oct 08, 2020
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
event/Loop: forward-declare class TimerEvent
parent
cd9ff9d9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
4 deletions
+11
-4
Loop.cxx
src/event/Loop.cxx
+8
-0
Loop.hxx
src/event/Loop.hxx
+3
-4
No files found.
src/event/Loop.cxx
View file @
947856ca
...
...
@@ -18,6 +18,7 @@
*/
#include "Loop.hxx"
#include "TimerEvent.hxx"
#include "SocketMonitor.hxx"
#include "IdleMonitor.hxx"
#include "DeferEvent.hxx"
...
...
@@ -29,6 +30,13 @@
#include <stdio.h>
#endif
constexpr
bool
EventLoop
::
TimerCompare
::
operator
()(
const
TimerEvent
&
a
,
const
TimerEvent
&
b
)
const
noexcept
{
return
a
.
due
<
b
.
due
;
}
EventLoop
::
EventLoop
(
ThreadId
_thread
)
:
SocketMonitor
(
*
this
),
/* if this instance is hosted by an EventThread (no ThreadId
...
...
src/event/Loop.hxx
View file @
947856ca
...
...
@@ -27,7 +27,6 @@
#include "thread/Mutex.hxx"
#include "WakeFD.hxx"
#include "SocketMonitor.hxx"
#include "TimerEvent.hxx"
#include "IdleMonitor.hxx"
#include "DeferEvent.hxx"
...
...
@@ -44,6 +43,8 @@
namespace
Uring
{
class
Queue
;
class
Manager
;
}
#endif
class
TimerEvent
;
/**
* An event loop that polls for events on file/socket descriptors.
*
...
...
@@ -59,9 +60,7 @@ class EventLoop final : SocketMonitor
struct
TimerCompare
{
constexpr
bool
operator
()(
const
TimerEvent
&
a
,
const
TimerEvent
&
b
)
const
{
return
a
.
due
<
b
.
due
;
}
const
TimerEvent
&
b
)
const
noexcept
;
};
using
TimerSet
=
...
...
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