All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Boehm, Hans" <hans_boehm@hp.com>
To: linux-ia64@vger.kernel.org
Subject: RE: [Linux-ia64] __clone not defined??
Date: Tue, 12 Feb 2002 18:17:42 +0000	[thread overview]
Message-ID: <marc-linux-ia64-105590698806039@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-105590698806038@msgid-missing>

The problem is that the __clone interface assumed that the location of the
stack for a new thread could be specified with a single stack pointer.  On
Itanium, this is not true, since the register stack engine needs its own
stack and stack pointer.

The corresponding call is __clone2().

The interface is 

/* int  __clone2(int (*fn) (void *arg), void *child_stack_base,         */
/*               size_t child_stack_size, int flags, void *arg) */

Note the extra child_stack_size argument, which allows the implementation to
divide the region into the two needed stacks.  Otherwise it's identical to
__clone().  The source is at

http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/linux/ia
64/clone2.S?rev=1.3&content-type=text/x-cvsweb-markup&cvsroot=glibc

There is some discussion at 

http://sources.redhat.com/ml/libc-hacker/2000-06/msg00129.html

I admit a man page would be nice. 

(In 99.9% of cases, user code should really call pthread_create() instead,
which does the right thing.)

Hans

> -----Original Message-----
> From: Ray Bryant [mailto:raybry@engr.sgi.com]
> Sent: Tuesday, February 12, 2002 10:02 AM
> To: linux-ia64
> Subject: [Linux-ia64] __clone not defined??
> 
> 
> I was trying to compile the chat_c benchmark under IA64 Linux (RedHat
> 7.1) and I get an undefined reference to __clone.  (chat_c calls
> __clone() directly.)  Anyone have any tips on how to fix this?
> -- 
> Best Regards,
> Ray
> -----------------------------------------------
> Ray Bryant               SGI
> 512-453-9679 (work)      512-507-7807 (cell)
> raybry@sgi.com           raybry@austin.rr.com
>      Computers are like air conditioners.
>    They stop working when you open Windows.
> -----------------------------------------------
> 
> _______________________________________________
> Linux-IA64 mailing list
> Linux-IA64@linuxia64.org
> http://lists.linuxia64.org/lists/listinfo/linux-ia64
> 


      reply	other threads:[~2002-02-12 18:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-12 18:02 [Linux-ia64] __clone not defined?? Ray Bryant
2002-02-12 18:17 ` Boehm, Hans [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=marc-linux-ia64-105590698806039@msgid-missing \
    --to=hans_boehm@hp.com \
    --cc=linux-ia64@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.