quic/qbox
Loading...
Searching...
No Matches
qkmulti-freerunning.h
1/*
2 * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All Rights Reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef QKMULTI_FREERUNNING_H
8#define QKMULTI_FREERUNNING_H
9
10#include <qkmultithread.h>
11
12namespace gs {
14{
15 virtual void sync() override
16 {
17 if (is_sysc_thread()) {
18 assert(m_local_time >= sc_core::sc_time_stamp());
19 sc_core::sc_time t = m_local_time - sc_core::sc_time_stamp();
20 m_tick.notify();
21 sc_core::wait(t);
22 } else {
23 /* Wake up the SystemC thread if it's waiting for us to keep up */
24 m_tick.notify();
25 }
26 }
27
28 virtual bool need_sync() override { return false; }
29};
30} // namespace gs
31#endif
Definition target.h:160
Definition qkmulti-freerunning.h:14
Definition qkmultithread.h:24
Tool which reads a Lua configuration file and sets parameters.
Definition biflow.cc:10