summaryrefslogtreecommitdiff
path: root/simpleperf/IOEventLoop.h
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2021-10-07 16:59:05 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2021-10-07 16:59:05 +0000
commit23c944f6dd01b7975a0dd85d48ab4f2abbad2593 (patch)
treedd72a84514306c5cc0c9025a1fb9e9e3976ced32 /simpleperf/IOEventLoop.h
parente474f50680b5c938d7462172b949578699df2854 (diff)
parent3b739c8720db08d5b34e8a547a5b2f6305fe37b6 (diff)
downloadextras-23c944f6dd01b7975a0dd85d48ab4f2abbad2593.tar.gz
Snap for 7803083 from 3b739c8720db08d5b34e8a547a5b2f6305fe37b6 to mainline-tzdata2-release
Change-Id: I3f7a03441a6392968c6e25d20d018e592a2c1e93
Diffstat (limited to 'simpleperf/IOEventLoop.h')
-rw-r--r--simpleperf/IOEventLoop.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/simpleperf/IOEventLoop.h b/simpleperf/IOEventLoop.h
index ee9014ae..f0192969 100644
--- a/simpleperf/IOEventLoop.h
+++ b/simpleperf/IOEventLoop.h
@@ -24,9 +24,12 @@
#include <memory>
#include <vector>
+struct event_base;
+
+namespace simpleperf {
+
struct IOEvent;
typedef IOEvent* IOEventRef;
-struct event_base;
// IOEventLoop is a class wrapper of libevent, it monitors events happened,
// and calls the corresponding callbacks. Possible events are: file ready to
@@ -53,8 +56,7 @@ class IOEventLoop {
bool AddSignalEvent(int sig, const std::function<bool()>& callback);
// Register a vector of signal Events.
- bool AddSignalEvents(std::vector<int> sigs,
- const std::function<bool()>& callback);
+ bool AddSignalEvents(std::vector<int> sigs, const std::function<bool()>& callback);
// Register a periodic Event, so [callback] is called periodically every
// [duration].
@@ -88,4 +90,6 @@ class IOEventLoop {
bool in_loop_;
};
+} // namespace simpleperf
+
#endif // SIMPLE_PERF_IOEVENT_LOOP_H_