1

change keyboard demo to event listener

This commit is contained in:
2022-07-11 22:51:03 +02:00
parent 60bb0cea78
commit 5ca6d25c7c
9 changed files with 58 additions and 14 deletions

View File

@ -13,7 +13,7 @@ void Semaphore::p() {
// Block and manage thread in semaphore queue until it's woken up by v() again
this->waitQueue.enqueue(scheduler.get_active());
this->lock.release();
scheduler.block(); // Moves to next thread
scheduler.block(); // Moves to next thread
}
}
@ -30,5 +30,4 @@ void Semaphore::v() {
this->counter = this->counter + 1;
this->lock.release();
}
}