The ROme OpTimistic Simulator  2.0.0
A General-Purpose Multithreaded Parallel/Distributed Simulation Platform
wnd.h
Go to the documentation of this file.
1 
29 #pragma once
30 
31 #ifdef HAVE_MPI
32 
33 #include <mpi.h>
34 
35 #include <datatypes/list.h>
36 #include <mm/mm.h>
37 #include <ROOT-Sim.h>
38 #include <arch/atomic.h>
39 
41 typedef struct _outgoing_msg {
42  MPI_Request req;
43  struct _outgoing_msg *next;
44  struct _outgoing_msg *prev;
46 } outgoing_msg;
47 
48 
50 typedef struct _outgoing_queue {
52  list(outgoing_msg) queue;
54 
55 extern void outgoing_window_init(void);
56 extern void outgoing_window_finalize(void);
57 extern void store_outgoing_msg(outgoing_msg * out_msg, unsigned int dest_kid);
58 extern int prune_outgoing_queues(void);
60 
61 #endif /* HAVE_MPI */
void outgoing_window_finalize(void)
Finalize the message delivery subsystem.
Definition: wnd.c:107
The structure representing a node in the outgoing_queue list.
Definition: wnd.h:41
struct _outgoing_msg * next
next pointer for the list
Definition: wnd.h:43
ROOT-Sim header for model development.
outgoing_msg * allocate_outgoing_msg(void)
Allocate a buffer for an outgoing message node.
Definition: wnd.c:130
int prune_outgoing_queues(void)
Prune all outgoing queues.
Definition: wnd.c:225
struct _outgoing_msg * prev
prev pointer for the list
Definition: wnd.h:44
spinlock_t lock
A lock used to protect access to the actual queue.
Definition: wnd.h:51
#define list(type)
Declare a "typed" list. This is a pointer to type, but the variable will instead reference a struct r...
Definition: list.h:51
Memory Manager main header.
Generic Lists.
Message Type definition.
Definition: core.h:164
MPI_Request req
The MPI Request used to keep track of the delivery operation.
Definition: wnd.h:42
Atomic operations.
void store_outgoing_msg(outgoing_msg *out_msg, unsigned int dest_kid)
Store an outgoing message.
Definition: wnd.c:167
MPI Support Module.
An outgoing queue, to keep track of pending MPI-based message delivery.
Definition: wnd.h:50
msg_t * msg
A pointer to the msg_t which MPI is delivering.
Definition: wnd.h:45
struct _outgoing_msg outgoing_msg
The structure representing a node in the outgoing_queue list.
void outgoing_window_init(void)
Outgoing queue initialization.
Definition: wnd.c:86