mirror of
https://gitlab.com/klmp200/LO41.git
synced 2024-12-23 00:01:11 +00:00
~~
This commit is contained in:
parent
d157623135
commit
f6f12b398d
@ -166,7 +166,8 @@ void go_to_floor_Building(THIS(Building), int origin, int destination, Passenger
|
||||
if (origin < 0 || origin >= FLOORS) {CRASH("You are trying to start from a non existing floor\n");}
|
||||
if (destination < 0 || destination >= FLOORS) {CRASH("You are trying to reach a non existing floor\n");}
|
||||
|
||||
this->waiting_passengers->insert_tail(this->waiting_passengers, (void*) &passenger, sizeof(passenger));
|
||||
//if(this->waiting_passengers->compare(this->waiting_passengers, (void*) &passenger, passenger.compare))
|
||||
this->waiting_passengers->insert_tail(this->waiting_passengers, (void*) &passenger, sizeof(passenger));//todo : check if inside list
|
||||
pthread_cond_wait(this->condition_floors[origin], this->mutex_cond_get_inside_elevator);
|
||||
elevator_number = this->get_inside_elevator(this, origin, passenger);
|
||||
|
||||
|
@ -14,7 +14,7 @@ void * runnable_Visitor(void * void_this){
|
||||
SharedData * data = GET_INSTANCE(SharedData);
|
||||
Passenger passenger;
|
||||
|
||||
AGENT_OPTIONS
|
||||
AGENT_OPTIONS;
|
||||
|
||||
passenger.visitor = this;
|
||||
passenger.type = VISITOR;
|
||||
|
Loading…
Reference in New Issue
Block a user