]> git.corax.cc Git - corax/commit
klibc/mutex: Avoid priority inversion in the mutex implementation
authorMatthias Kruk <m@m10k.eu>
Sat, 8 Feb 2020 14:26:08 +0000 (23:26 +0900)
committerMatthias Kruk <m@m10k.eu>
Sat, 8 Feb 2020 14:26:08 +0000 (23:26 +0900)
commitc5ce170469c715f41edccdef3fbc36a3be401efd
treea33c129cd480a8f26c9414f8997f302b3466bf10
parent9d0853a40b4315f6f5b187a840b9754bc4c7fbd3
klibc/mutex: Avoid priority inversion in the mutex implementation

Wake up all tasks waiting on a mutex when it gets unlocked. This way,
the order in which the waiting tasks will acquire the mutex depends
solely on the scheduler (and the tasks priority), not implicitly on
the mutex.
kernel/include/mutex.h
kernel/klibc/mutex.c