Download c source code

/*
 * 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;
}