Subject: Re: newlock
To: Hans Petter Selasky <hselasky@c2i.net>
From: Jason Thorpe <thorpej@shagadelic.org>
List: tech-kern
Date: 09/03/2006 14:30:04
On Sep 3, 2006, at 3:13 AM, Hans Petter Selasky wrote:
> 1) Try to avoid using function/structure names already defined by by
> the
> FreeBSD mutex implementation, "man mutex", so that one can put an
> emulation
> layer on top that emulates FreeBSD mutexes on NetBSD.
The goal is for the NetBSD API to be like the Solaris API. That was
my intent when I originally wrote this code.
> 2) Mutexes must allow recursation.
Absolutely NOT. Recursive mutexes are just plain evil. The goal is
to have a BETTER locking API, not have the same warts as the crappy
one that we currently have.
> 3) Nice if there are some functions that can drop/pickup the
> recursation
> count.
Not applicable.
> 4) You need to implement mutex_sleep(), like there is "ltsleep" for
> simplelocks. Try to avoid the function name "msleep()".
What's wrong with msleep() as a name?
-- thorpej