Loading...
Searching...
No Matches
event.h File Reference

Event notification wait and signaling functions. More...

#include "visibility.h"
#include "wait.h"

Classes

struct  PLMD::thread_mpi::tMPI_Event_t
 

Namespaces

namespace  PLMD
 Fast (possibly busy-wait-based) barrier type.
 
namespace  PLMD::thread_mpi
 

Macros

#define tMPI_Event_process(ev, N)
 
#define tMPI_Event_signal(ev)
 

Typedefs

typedef struct tMPI_Event_t PLMD::thread_mpi::tMPI_Event
 

Functions

TMPI_EXPORT void PLMD::thread_mpi::tMPI_Event_destroy (tMPI_Event *ev)
 Deallocate the internals of the contents of event object.
 
TMPI_EXPORT void PLMD::thread_mpi::tMPI_Event_init (tMPI_Event *ev)
 Initialize the event object.
 
TMPI_EXPORT int PLMD::thread_mpi::tMPI_Event_wait (tMPI_Event *ev)
 Wait for an event to occur.
 

Detailed Description

Event notification wait and signaling functions.

The event structure offers lightweight signaling and scheduler-yielding (but still spinning) waiting for waits of intermediate durations (i.e. longer than appropriate for a spin lock but shorter than mutex_cond_wait(). These functions only take care of the waiting and signaling; the user is responsible for the handling of the actual event structures and condition variables.

Macro Definition Documentation

◆ tMPI_Event_process

#define tMPI_Event_process ( ev,
N )
Value:
{ \
(ev)->last_sync += N; \
}

◆ tMPI_Event_signal

#define tMPI_Event_signal ( ev)
Value:
{ \
tMPI_Atomic_memory_barrier_rel(); \
tMPI_Atomic_fetch_add( &((ev)->sync), 1); \
}