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

Test: concurrent hash map for register incoming remote messages. More...

#include <test.h>
#include <test_rng.h>
#include <datatypes/remote_msg_map.h>
#include <memory.h>
#include <stdatomic.h>
#include <stdint.h>
#include <stdlib.h>
+ Include dependency graph for remote_msg_map_test.c:

Go to the source code of this file.

Macros

#define THREAD_CNT   2
 
#define MSG_COUNT   1000000
 

Functions

void msg_queue_insert (struct lp_msg *msg)
 Inserts a message in the queue. More...
 
static int remote_msg_map_test (void)
 
static int remote_msg_map_test_init (void)
 
static int remote_msg_map_test_fini (void)
 

Variables

static atomic_uint insert_calls
 
const struct test_config test_config
 The test configuration object, must be defined by the test sources. More...
 

Detailed Description

Test: concurrent hash map for register incoming remote messages.

Definition in file remote_msg_map_test.c.

Function Documentation

◆ msg_queue_insert()

void msg_queue_insert ( struct lp_msg msg)

Inserts a message in the queue.

Parameters
msgthe message to insert in the queue

Definition at line 24 of file remote_msg_map_test.c.

Variable Documentation

◆ test_config

const struct test_config test_config
Initial value:
= {
.threads_count = 2 ,
.test_init_fnc = remote_msg_map_test_init,
.test_fini_fnc = remote_msg_map_test_fini,
.test_fnc = remote_msg_map_test
}

The test configuration object, must be defined by the test sources.

Definition at line 84 of file remote_msg_map_test.c.