Threads and clone()

Threads and clone()

Post by Bernd Potzka » Thu, 11 Mar 1999 04:00:00



Hi,

I am trying to port some OS/2 and windows apps to Linux.
However using of clone() is failing, because the function was not found
by the linker.
In which library exists clone() or is something else wrong ?
Where do I find more information (books, howtos, etc.) about
multithreading under Linux ?

The linux distribution that I use is SuSE 6.0.

Thanks,
        Bernd

 
 
 

Threads and clone()

Post by Kelly Burkhar » Thu, 11 Mar 1999 04:00:00



> Hi,

> I am trying to port some OS/2 and windows apps to Linux.
> However using of clone() is failing, because the function was not found
> by the linker.
> In which library exists clone() or is something else wrong ?
> Where do I find more information (books, howtos, etc.) about
> multithreading under Linux ?

> The linux distribution that I use is SuSE 6.0.

> Thanks,
>    Bernd

If your distribution uses glibc, you should use pthreads.  Pthreads in
recent glibc evolved from LinuxThreads written by Xavier Leroy.  The
threading is implemented using clone().

FWIW, to use clone directly you must use assembler.

--
Kelly R. Burkhart


 
 
 

Threads and clone()

Post by Steffen Offerma » Tue, 16 Mar 1999 04:00:00


Kelly Burkhart wrote in a message to Bernd Potzkai:

 KB> If your distribution uses glibc, you should use pthreads.  

BTW: Are there any plans to support _real_ threads (i.e. kernel-threads) on
Linux someday?

Tschuess,
  Steffen

 
 
 

Threads and clone()

Post by Miquel van Smoorenbu » Fri, 19 Mar 1999 04:00:00





>> Now, what I'd like to know is: Are we going to see the threads start sharing
>> the same PID, as the POSIX draft dictates?

>I've heard rumors (months ago) of maybe (who knows) at some point potentially
>start considering the eventual possibility of perhaps setting up a mailing-list
>to decide whether or not someone should take a look at the realizability
>of a study that might lead later to a prototype implementation of 32bit PID
>split into 16bit processID and 16bit threadID.

Ofcourse you could also introduce a new group - we already have a "session"
(setsid()), a "process group" (setpgid) why not add a "thread group" (settid())
Signals should be sent to the "thread group leader".

Mike.
--
Indifference will certainly be the downfall of mankind, but who cares?

 
 
 

Threads and clone()

Post by H. Peter Anv » Fri, 19 Mar 1999 04:00:00




In newsgroup: comp.os.linux.development.system

Quote:

> Ofcourse you could also introduce a new group - we already have a
> "session" (setsid()), a "process group" (setpgid) why not add a
> "thread group" (settid()) Signals should be sent to the "thread
> group leader".

Actually the "thread group" is called the pid; there is also the
thread id (tid).  I have previously suggested that the pids and tids
be allocated out of the same pool; tasks then have a pid (which may be
shared) and a tid (which is always unique.)

        -hpa

--
"The user's computer downloads the ActiveX code and simulates a 'Blue
Screen' crash, a generally benign event most users are familiar with
and that would not necessarily arouse suspicions."
-- Security exploit description on http://www.zks.net/p3/how.aspb

 
 
 

Threads and clone()

Post by James Youngma » Fri, 19 Mar 1999 04:00:00





> In newsgroup: comp.os.linux.development.system

> > Ofcourse you could also introduce a new group - we already have a
> > "session" (setsid()), a "process group" (setpgid) why not add a
> > "thread group" (settid()) Signals should be sent to the "thread
> > group leader".

> Actually the "thread group" is called the pid; there is also the
> thread id (tid).  I have previously suggested that the pids and tids
> be allocated out of the same pool; tasks then have a pid (which may be
> shared) and a tid (which is always unique.)

So a process which consists of just the original thread will have a
PID and a TID, whose value will not be the same, I assume?

--