Projet d'ascenseurs intelligents multi threads pour l'UV LO41
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

18 lines
326 B

//
// Created by Antoine Bartuccio on 22/05/2018.
//
#include "Objects.h"
void *malloc_or_die(size_t size){
void *ptr = malloc(size);
if (ptr == NULL){
CRASH("Error allocating object");
}
return ptr;
}
void agent_exit(int error_code){
printf("Agent receiving code %d, exiting\n", error_code);
pthread_exit(NULL);
}