The ROme OpTimistic Simulator  3.0.0
A General-Purpose Multithreaded Parallel/Distributed Simulation Platform
msg.h File Reference

Message management functions. More...

#include <core/core.h>
#include <stdatomic.h>
#include <stddef.h>
+ Include dependency graph for msg.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  lp_msg
 A model simulation message. More...
 

Macros

#define BASE_PAYLOAD_SIZE   48
 
#define msg_is_before(msg_a, msg_b)   ((msg_a)->dest_t < (msg_b)->dest_t)
 
#define msg_bare_size(msg)   (offsetof(struct lp_msg, pl) + (msg)->pl_size)
 
#define msg_id_get(msg, cur_phase)   (((uintptr_t)msg) | ((unsigned)(cur_phase) << 1))
 
#define msg_id_phase_get(msg_id)   (((msg_id) >> 1) & 1U)
 
#define msg_id_anti_phase_get(msg_id)   ((msg_id) & 1U)
 
#define msg_id_anti_phase_set(msg_id, phase)
 

Enumerations

enum  msg_flag { MSG_FLAG_ANTI = 1, MSG_FLAG_PROCESSED = 2 }
 

Detailed Description

Message management functions.

Message management functions

Definition in file msg.h.

Macro Definition Documentation

◆ msg_id_anti_phase_set

#define msg_id_anti_phase_set (   msg_id,
  phase 
)
Value:
__extension__({ \
(msg_id) &= ~((uintptr_t) 1U); \
(msg_id) |= (phase); \
})

Definition at line 27 of file msg.h.