core+daemon: eliminate scheduler::{schedule,cancel} wrappers
Also move core/global-io.hpp to daemon/global.hpp
Refs: #4528, #4883
Change-Id: I0b99029f1a19d7451aab57099cd3303b7eb42ff3
diff --git a/daemon/table/cs-policy-priority-fifo.cpp b/daemon/table/cs-policy-priority-fifo.cpp
index 7984739..f350c72 100644
--- a/daemon/table/cs-policy-priority-fifo.cpp
+++ b/daemon/table/cs-policy-priority-fifo.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2018, Regents of the University of California,
+ * Copyright (c) 2014-2019, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -25,6 +25,7 @@
#include "cs-policy-priority-fifo.hpp"
#include "cs.hpp"
+#include "daemon/global.hpp"
namespace nfd {
namespace cs {
@@ -117,8 +118,8 @@
}
else {
entryInfo->queueType = QUEUE_FIFO;
- entryInfo->moveStaleEventId = scheduler::schedule(i->getData().getFreshnessPeriod(),
- [=] { moveToStaleQueue(i); });
+ entryInfo->moveStaleEventId = getScheduler().schedule(i->getData().getFreshnessPeriod(),
+ [=] { moveToStaleQueue(i); });
}
Queue& queue = m_queues[entryInfo->queueType];
@@ -133,7 +134,7 @@
EntryInfo* entryInfo = m_entryInfoMap[i];
if (entryInfo->queueType == QUEUE_FIFO) {
- scheduler::cancel(entryInfo->moveStaleEventId);
+ entryInfo->moveStaleEventId.cancel();
}
m_queues[entryInfo->queueType].erase(entryInfo->queueIt);