 |
The ROme OpTimistic Simulator
3.0.0
A General-Purpose Multithreaded Parallel/Distributed Simulation Platform
|
Go to the documentation of this file.
15 #include <stdatomic.h>
18 #define BASE_PAYLOAD_SIZE 48
20 #define msg_is_before(msg_a, msg_b) ((msg_a)->dest_t < (msg_b)->dest_t)
21 #define msg_bare_size(msg) (offsetof(struct lp_msg, pl) + (msg)->pl_size)
23 #define msg_id_get(msg, cur_phase) \
24 (((uintptr_t)msg) | ((unsigned)(cur_phase) << 1))
25 #define msg_id_phase_get(msg_id) (((msg_id) >> 1) & 1U)
26 #define msg_id_anti_phase_get(msg_id) ((msg_id) & 1U)
27 #define msg_id_anti_phase_set(msg_id, phase) \
29 (msg_id) &= ~((uintptr_t) 1U); \
30 (msg_id) |= (phase); \
41 #if LOG_LEVEL <= LOG_DEBUG
54 unsigned char pl[BASE_PAYLOAD_SIZE];
61 MSG_FLAG_PROCESSED = 2
double simtime_t
The type used to represent logical time in the simulation.
unsigned char extra_pl[]
The continuation of the payload.
atomic_int flags
The flags to handle local anti messages.
uint_fast32_t m_type
The message type, a user controlled field.
A model simulation message.
lp_id_t dest
The id of the recipient LP.
unsigned char pl[48]
The initial part of the payload.
uint64_t lp_id_t
Used to uniquely identify LPs in the simulation.
Core ROOT-Sim functionalities.
uint_fast32_t pl_size
The message payload size.
uintptr_t msg_id
The message unique id, used for inter-node anti messages.
simtime_t dest_t
The intended destination logical time of this message.