cam: event_loop: Rename event_ to base_

The 'event' variable name is usually used for events added to the base
event loop, not the loop itself. Rename the struct event_base member to
base_ as a preparation for future work adding events to the loop.

There is no functional change.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
Niklas Söderlund
2021-02-02 21:20:21 +01:00
parent 9708f49fec
commit 297c9c3fa0
2 changed files with 5 additions and 5 deletions

View File

@@ -18,7 +18,7 @@ EventLoop::EventLoop()
assert(!instance_);
evthread_use_pthreads();
event_ = event_base_new();
base_ = event_base_new();
instance_ = this;
}
@@ -26,7 +26,7 @@ EventLoop::~EventLoop()
{
instance_ = nullptr;
event_base_free(event_);
event_base_free(base_);
libevent_global_shutdown();
}
@@ -42,7 +42,7 @@ int EventLoop::exec()
while (!exit_.load(std::memory_order_acquire)) {
dispatchCalls();
event_base_loop(event_, EVLOOP_NO_EXIT_ON_EMPTY);
event_base_loop(base_, EVLOOP_NO_EXIT_ON_EMPTY);
}
return exitCode_;
@@ -57,7 +57,7 @@ void EventLoop::exit(int code)
void EventLoop::interrupt()
{
event_base_loopbreak(event_);
event_base_loopbreak(base_);
}
void EventLoop::callLater(const std::function<void()> &func)

View File

@@ -30,7 +30,7 @@ public:
private:
static EventLoop *instance_;
struct event_base *event_;
struct event_base *base_;
std::atomic<bool> exit_;
int exitCode_;