[lkml]   [2000]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: thread group comments
On Fri, Sep 01, 2000 at 06:15:52PM -0700, Linus Torvalds wrote:
> if (!has_done_this_before) {
> pid_t tid;
> has_done_this_before = 1;
> tid = clone(CLONE_PID);

I'm not sure this will work very well (2.4.0test8-pre1):

int do_fork(unsigned long clone_flags, unsigned long usp, struct pt_regs *regs)
int retval = -ENOMEM;
struct task_struct *p;

if (clone_flags & CLONE_PID) {
/* This is only allowed from the boot up thread */
if (current->pid)
return -EPERM;

So it would require fixing CLONE_PID first, which is probably nasty.

Without it it'll still require the context switches when you're calling
pthread_create from the "original" thread.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:38    [W:0.050 / U:1.948 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site