#include #include #include #include /* Non standard include */ #include struct thread_comm *tcomms; volatile int cont = 1; int init_library() { tcomms = (struct thread_comm *) malloc(nb_prod * sizeof(struct thread_comm)); if (tcomms == NULL) { fprintf(stderr, "Failed to allocate %lu bytes needed by the library to work\n", nb_prod * sizeof(struct thread_comm)); return -1; } return 0; }