Explicit synchronization mechanisms: semaphores (msg_sem_t) and friends.
In some situations, these things are very helpful to synchronize processes without message exchanges.
◆ MSG_BARRIER_SERIAL_PROCESS
#define MSG_BARRIER_SERIAL_PROCESS |
Opaque type representing a barrier identifier.
◆ msg_sem_t
Opaque type representing a semaphore.
◆ MSG_sem_init()
creates a semaphore object of the given initial capacity
◆ MSG_sem_acquire()
locks on a semaphore object
◆ MSG_sem_acquire_timeout()
locks on a semaphore object up until the provided timeout expires
◆ MSG_sem_release()
releases the semaphore object
◆ MSG_sem_get_capacity()
◆ MSG_sem_destroy()
◆ MSG_sem_would_block()
returns a boolean indicating if this semaphore would block at this very specific time
Note that the returned value may be wrong right after the function call, when you try to use it... But that's a classical semaphore issue, and SimGrid's semaphore are not different to usual ones here.
◆ MSG_barrier_init()
msg_bar_t MSG_barrier_init |
( |
unsigned int |
count | ) |
|
Initializes a barrier, with count elements.
◆ MSG_barrier_destroy()
Initializes a barrier, with count elements.
◆ MSG_barrier_wait()
Performs a barrier already initialized.