Project

General

Profile

Feature #6209

libc mutexes break kernel writers hearts

Added by Robert Mustacchi about 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Normal
Category:
lib - userland libraries
Start date:
2015-09-08
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

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().

History

#1

Updated by Electric Monk about 4 years ago

  • Status changed from New to Closed

git commit 0d045c0d0cb001d79480ee33be28514e847f8612

commit  0d045c0d0cb001d79480ee33be28514e847f8612
Author: Robert Mustacchi <rm@joyent.com>
Date:   2015-09-14T20:47:46.000Z

    6209 libc mutexes break kernel writers hearts
    Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
    Reviewed by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
    Reviewed by: Dan McDonald <danmcd@omniti.com>
    Reviewed by: Garrett D'Amore <garrett@damore.org>
    Approved by: Dan McDonald <danmcd@omniti.com>

Also available in: Atom PDF