1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 | /*
* Copyright 2021 Jeisson Hidalgo-Cespedes - Universidad de Costa Rica
*/
#ifndef SIMULATION_H
#define SIMULATION_H
#include "arguments.h"
int simulate_producer_consumer(shared_thread_data_t* shared_data);
int create_threads(shared_thread_data_t* shared_data);
void* produce(void* data);
void* consume(void* data);
/**
* @param min must be less than @a max
* @param max must be greater than @a min
*/
void random_delay(useconds_t min, useconds_t max, unsigned* seedp);
#endif // SIMULATION_H
|