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 over 5 years ago
- Status changed from New to Closed
commit 0d045c0d0cb001d79480ee33be28514e847f8612 Author: Robert Mustacchi <firstname.lastname@example.org> Date: 2015-09-14T20:47:46.000Z 6209 libc mutexes break kernel writers hearts Reviewed by: Jerry Jelinek <email@example.com> Reviewed by: Josef 'Jeff' Sipek <firstname.lastname@example.org> Reviewed by: Dan McDonald <email@example.com> Reviewed by: Garrett D'Amore <firstname.lastname@example.org> Approved by: Dan McDonald <email@example.com>