// Copyright 2021 Jeisson Hidalgo-Cespedes CC-BY-4 // Simulates a producer and a consumer that share a unbounded buffer #include #include #include "simulation.h" int main(int argc, char* argv[]) { int error = EXIT_SUCCESS; simulation_t* simulation = simulation_create(); if (simulation) { error = simulation_run(simulation, argc, argv); simulation_destroy(simulation); } else { fprintf(stderr, "error: could not allocate simulation\n"); error = EXIT_FAILURE; } return error; }