libc mutexes break kernel writers hearts
Userland mutexes are a bit unfortunate. By default they don't check for errors at all and even if you do enable error checking mutexes, you have to wrap everything up in VERIFY0's. Instead, we should take a leaf from the kernel and add two private symbols to libc, mutex_enter() and mutex_exit() that behave identically to their kernel compatriots. Importantly these return void, they require error checking mutexes and if we don't have what we expect, we'll explicitly panic; i.e., abort().
Updated by Electric Monk about 4 years ago
- Status changed from New to Closed
commit 0d045c0d0cb001d79480ee33be28514e847f8612 Author: Robert Mustacchi <email@example.com> Date: 2015-09-14T20:47:46.000Z 6209 libc mutexes break kernel writers hearts Reviewed by: Jerry Jelinek <firstname.lastname@example.org> Reviewed by: Josef 'Jeff' Sipek <email@example.com> Reviewed by: Dan McDonald <firstname.lastname@example.org> Reviewed by: Garrett D'Amore <email@example.com> Approved by: Dan McDonald <firstname.lastname@example.org>