* [Linux-ia64] __clone not defined??
@ 2002-02-12 18:02 Ray Bryant
2002-02-12 18:17 ` Boehm, Hans
0 siblings, 1 reply; 2+ messages in thread
From: Ray Bryant @ 2002-02-12 18:02 UTC (permalink / raw)
To: linux-ia64
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.
-----------------------------------------------
^ permalink raw reply [flat|nested] 2+ messages in thread
* RE: [Linux-ia64] __clone not defined??
2002-02-12 18:02 [Linux-ia64] __clone not defined?? Ray Bryant
@ 2002-02-12 18:17 ` Boehm, Hans
0 siblings, 0 replies; 2+ messages in thread
From: Boehm, Hans @ 2002-02-12 18:17 UTC (permalink / raw)
To: linux-ia64
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
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-02-12 18:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-02-12 18:02 [Linux-ia64] __clone not defined?? Ray Bryant
2002-02-12 18:17 ` Boehm, Hans
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox