[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Thread deficiencies



"Theodore Y. Ts'o" wrote:
> 
>    Date: Thu, 6 Jan 2000 21:52:04 -0500
>    From: Jim Knoble <jmknoble@pobox.com>
> 
>    Perhaps i'm misremembering, but i was under the impression that the
>    consensus at the LSB spec meeting in New York last month was the
>    following:
> 
>      (1) Specify clone(), in particular because it's used by Apache.
> 
> There was some disagreement about this, in particular because it might
> cause heartburn for certain Linux emulators (i.e., SCO, NetBSD, etc.).
> I personally don't think that making it hard for non-Linux systems that
> are trying to emulate Linux so that they can run LSB application is
> *our* problem, but there were some people that did have this concern.

Since when has it been our responsibility to make it easier for
non-Linux systems to emulate Linux? Let's just define the behavior of a
single Linux model to which the distributions can conform. clone() is
what's available in Linux today, and that's what we should adopt as the
standard. If a new, superior thread implementation is developed in the
future, we can adopt that instead, but for now it should be clone().

> This might have been partially addressed by the proposal that we specify
> clone() with a specific (limited) flags combination (to be determined
> later).
> 
>      (2) Put pthreads in an `annex' to the spec, with descriptions of how
>          it differs from POSIX.4 (i.e., doesn't work).
> 
> For the short term, yes.  There was however a strong feeling that a
> number of applications *will* want to use POSIX.4, and so saying that
> such apps couldn't be LSB compliant might not necessarily be the right
> thing either.

No. Firstly, we are not the POSIX standards body. We are the __Linux__
standards body. Any pretense of being all things to everyone should be
dropped right now. Developers that want to write Linux apps will have to
use what Linux provides. Linux doesn't have pthreads, it has clone(). So
we should adopt clone(). 

Secondarily, if we cannot have a pthreads that matches POSIX.4 then it's
best not to include it in the spec at all. Having nothing is much better
than having a half-baked imitation. At the least, we won't have to trust
in our ability to document how our spec'ed pthreads differs from POSIX
and that it will be correctly understood by developers. They'd hate
having to wade through the spec AND their code to determine why it isn't
working correctly. It's better for them to know that pthreads isn't
available in Linux and they'll have to recode accordingly.

Thirdly, #ifdef'ing around clone()/pthread is much more easily
understood than #ifdef'ing within pthread/pthread code.

Al Guerra


Reply to: