1
0
mirror of https://gitlab.com/klmp200/LO41.git synced 2024-11-21 16:23:22 +00:00

Les doublons

This commit is contained in:
Antoine Bartuccio 2018-06-17 18:49:00 +02:00
parent 3126e57610
commit 8bf2b3358d
Signed by: klmp200
GPG Key ID: E7245548C53F904B
2 changed files with 0 additions and 8 deletions

View File

@ -7,12 +7,6 @@
GETTER(SharedData, Building *, main_building)
SETTER(SharedData, Building *, main_building)
void wait_threads_SharedData(THIS(SharedData)){
int i;
for (i=0; i<this->threads_nb; i++)
pthread_join(this->threads[i], NULL);
}
int call_elevator_SharedData(THIS(SharedData), int starting_floor, int destination_floor){
/* Make the thread wait for an elevator available and return the id of the elevator available */
if (this->main_building == NULL)
@ -103,7 +97,6 @@ SharedData *_get_instance_SharedData(){
new_shared_data->threads_nb = 0;
LINK_ALL(SharedData, new_shared_data,
wait_threads,
start_thread,
start_all_threads,
wait_all_threads,

View File

@ -20,7 +20,6 @@ typedef struct o_SharedData {
PUBLIC void (*start_all_threads)(_THIS(SharedData));
PUBLIC void (*set_main_building)(_THIS(SharedData), Building * building);
PUBLIC Building * (*get_main_building)(_THIS(SharedData));
PUBLIC void (*wait_threads)(_THIS(SharedData));
PUBLIC int (*call_elevator)(_THIS(SharedData), int starting_floor, int destination_floor);
PUBLIC int (*use_call_box)(_THIS(SharedData), char * resident_name);