1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 | /*
* Copyright 2021 Jeisson Hidalgo-Cespedes - Universidad de Costa Rica
* Creates a secondary thread that greets in the standard output
*/
#include <stdlib.h>
#include "simulation.h"
int main(int argc, char* argv[]) {
int error = 0;
shared_thread_data_t* shared_data = (shared_thread_data_t*)
calloc(1, sizeof(shared_thread_data_t));
error = analyze_arguments(argc, argv, shared_data);
if (error == EXIT_SUCCESS) {
error = simulate_producer_consumer(shared_data);
}
return error;
}
|