mirror of
https://gitlab.com/klmp200/LO41.git
synced 2025-07-12 04:39:23 +00:00
Auront-ont vaincu la préemption ?
This commit is contained in:
@ -206,7 +206,9 @@ void go_to_floor_Building(THIS(Building), int origin, int destination, Passenger
|
||||
elevator_number = this->get_inside_elevator(this, origin, passenger);
|
||||
if (elevator_number != -1){ //passenger accepted in elevator
|
||||
this->waiting_floors[origin]--;//on retire de la liste des attentes
|
||||
pthread_mutex_lock(this->mutex_cond_get_outside_elevator);
|
||||
pthread_cond_wait(this->condition_floors[destination], this->mutex_cond_get_outside_elevator);
|
||||
pthread_mutex_unlock(this->mutex_cond_get_outside_elevator);
|
||||
this->elevators[elevator_number]->remove_passenger(this->elevators[elevator_number], passenger);
|
||||
}else{
|
||||
if (passenger->type == RESIDENT)
|
||||
|
Reference in New Issue
Block a user