core: forward ScheduleNow(...) to Schedule(0, ...)
This commit is contained in:
@@ -283,15 +283,7 @@ DefaultSimulatorImpl::ScheduleNow (EventImpl *event)
|
||||
{
|
||||
NS_ASSERT_MSG (SystemThread::Equals (m_main), "Simulator::ScheduleNow Thread-unsafe invocation!");
|
||||
|
||||
Scheduler::Event ev;
|
||||
ev.impl = event;
|
||||
ev.key.m_ts = m_currentTs;
|
||||
ev.key.m_context = GetContext ();
|
||||
ev.key.m_uid = m_uid;
|
||||
m_uid++;
|
||||
m_unscheduledEvents++;
|
||||
m_events->Insert (ev);
|
||||
return EventId (event, ev.key.m_ts, ev.key.m_context, ev.key.m_uid);
|
||||
return Schedule (Time (0), event);
|
||||
}
|
||||
|
||||
EventId
|
||||
|
||||
@@ -579,21 +579,7 @@ EventId
|
||||
RealtimeSimulatorImpl::ScheduleNow (EventImpl *impl)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << impl);
|
||||
Scheduler::Event ev;
|
||||
{
|
||||
CriticalSection cs (m_mutex);
|
||||
|
||||
ev.impl = impl;
|
||||
ev.key.m_ts = m_currentTs;
|
||||
ev.key.m_context = GetContext ();
|
||||
ev.key.m_uid = m_uid;
|
||||
m_uid++;
|
||||
m_unscheduledEvents++;
|
||||
m_events->Insert (ev);
|
||||
m_synchronizer->Signal ();
|
||||
}
|
||||
|
||||
return EventId (impl, ev.key.m_ts, ev.key.m_context, ev.key.m_uid);
|
||||
return Schedule (Time (0), impl);
|
||||
}
|
||||
|
||||
Time
|
||||
|
||||
@@ -508,16 +508,7 @@ EventId
|
||||
DistributedSimulatorImpl::ScheduleNow (EventImpl *event)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << event);
|
||||
|
||||
Scheduler::Event ev;
|
||||
ev.impl = event;
|
||||
ev.key.m_ts = m_currentTs;
|
||||
ev.key.m_context = GetContext ();
|
||||
ev.key.m_uid = m_uid;
|
||||
m_uid++;
|
||||
m_unscheduledEvents++;
|
||||
m_events->Insert (ev);
|
||||
return EventId (event, ev.key.m_ts, ev.key.m_context, ev.key.m_uid);
|
||||
return Schedule (Time (0), event);
|
||||
}
|
||||
|
||||
EventId
|
||||
|
||||
@@ -438,16 +438,7 @@ EventId
|
||||
NullMessageSimulatorImpl::ScheduleNow (EventImpl *event)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << event);
|
||||
|
||||
Scheduler::Event ev;
|
||||
ev.impl = event;
|
||||
ev.key.m_ts = m_currentTs;
|
||||
ev.key.m_context = GetContext ();
|
||||
ev.key.m_uid = m_uid;
|
||||
m_uid++;
|
||||
m_unscheduledEvents++;
|
||||
m_events->Insert (ev);
|
||||
return EventId (event, ev.key.m_ts, ev.key.m_context, ev.key.m_uid);
|
||||
return Schedule (Time (0), event);
|
||||
}
|
||||
|
||||
EventId
|
||||
|
||||
Reference in New Issue
Block a user