Line data Source code
1 1 : /** 2 : * @file gvt/termination.h 3 : * 4 : * @brief Termination detection module 5 : * 6 : * SPDX-FileCopyrightText: 2008-2021 HPDCS Group <rootsim@googlegroups.com> 7 : * SPDX-License-Identifier: GPL-3.0-only 8 : */ 9 : #pragma once 10 : 11 : #include <core/core.h> 12 : 13 : #include <stdatomic.h> 14 : 15 0 : extern _Atomic(nid_t) nodes_to_end; 16 : 17 0 : #define termination_cant_end() (atomic_load_explicit(&nodes_to_end, memory_order_relaxed) > 0) 18 : 19 0 : extern void termination_global_init(void); 20 0 : extern void termination_lp_init(void); 21 0 : extern void termination_on_msg_process(simtime_t msg_time); 22 0 : extern void termination_on_gvt(simtime_t current_gvt); 23 0 : extern void termination_on_lp_rollback(simtime_t msg_time); 24 0 : extern void termination_on_ctrl_msg(void); 25 0 : extern void termination_force(void); 26 :