Subject: Re: CVS commit: src/sys/compat/linux/common
To: Nathan J. Williams <nathanw@wasabisystems.com>
From: Perry E. Metzger <perry@piermont.com>
List: source-changes
Date: 11/05/2005 14:02:29
"Nathan J. Williams" <nathanw@wasabisystems.com> writes:
> Emmanuel Dreyfus <manu@NetBSD.org> writes:
>
>> On Sat, Nov 05, 2005 at 10:42:11AM -0500, Perry E. Metzger wrote:
>> > If we are going to implement this for Linux, shouldn't we get a native
>> > version too?
>> 
>> I don't know: what are futex used for? Are they desirable?
>
> They're used to implement userspace thread mutexes; since Linux
> threads are 1:1 kernel entities, they need kernel assistance to block
> and switch to another thread.
>
> They might be useful for us for implementing process-shared mutexes.
> (not a feature I've actually seen much demand for...)

To me, it is also a question of making sure that, if we're going to
bother going through the trouble of making sure linux code will run
emulated, we should make sure it will run natively compiled as well so
we can be API compatible. We have clone(2) for much that reason too,
and it initially appeared as something in the linux compat code.

Perry