mirror of
https://gitlab.com/klmp200/LO41.git
synced 2025-07-12 04:39:23 +00:00
préempté ?
This commit is contained in:
@ -5,6 +5,7 @@
|
||||
#include <string.h>
|
||||
#include <pthread.h>
|
||||
#include "Resident.h"
|
||||
#include "../SharedData/SharedData.h"
|
||||
|
||||
GETTER(Resident, char *, name);
|
||||
GETTER(Resident, int, id);
|
||||
@ -12,11 +13,17 @@ GETTER(Resident, int, apartment_floor);
|
||||
|
||||
void * runnable_Resident(void * void_this){
|
||||
Resident * this = (Resident*) void_this;
|
||||
SharedData* data = GET_INSTANCE(SharedData);
|
||||
Passenger passenger;
|
||||
|
||||
AGENT_OPTIONS
|
||||
AGENT_OPTIONS;
|
||||
|
||||
passenger.resident = this;
|
||||
passenger.type = RESIDENT;
|
||||
|
||||
printf("Je suis le resident %s et je suis a l'etage %d en direction de l'etage %d\n",
|
||||
this->name, this->apartment_floor, this->destination);
|
||||
data->main_building->go_to_floor(data->main_building, this->position, this->destination, passenger);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user