The ROme OpTimistic Simulator
2.0.0
A General-Purpose Multithreaded Parallel/Distributed Simulation Platform
Main Page
Data Structures
Files
File List
Globals
msgchannel.h
Go to the documentation of this file.
1
30
#pragma once
31
32
#include <
core/core.h
>
33
34
struct
_msg_buff
{
35
msg_t
*
volatile
*buffer;
36
volatile
unsigned
int
size;
37
volatile
unsigned
int
written;
38
volatile
unsigned
int
read;
39
};
40
41
typedef
struct
_msg_channel
{
42
struct
_msg_buff
*
volatile
buffers[2];
43
atomic_t
size;
44
spinlock_t
write_lock;
45
}
msg_channel
;
46
47
#define INITIAL_CHANNEL_SIZE (512)
48
49
extern
msg_channel
*init_channel(
void
);
50
extern
void
fini_channel(
msg_channel
*);
51
extern
void
insert_msg(
msg_channel
*,
msg_t
*);
52
extern
void
*get_msg(
msg_channel
*);
_msg_buff
Definition:
msgchannel.h:34
core.h
Core ROOT-Sim functionalities.
_msg_t
Message Type definition.
Definition:
core.h:164
atomic_t
Definition:
atomic.h:42
_msg_channel
Definition:
msgchannel.h:41
spinlock_t
Definition:
atomic.h:51
src
datatypes
msgchannel.h
Generated by
1.8.11