Re: Current changes for NPTL on PPC

Jakub Jelinek <[email protected]>
Newsgroups gmane.comp.lib.phil
Message-ID <[email protected]>
On Tue, Mar 11, 2003 at 10:28:21PM +1100, Paul Mackerras wrote:
> Here is the patch with all the extra files needed for NPTL on PPC32.
> This together with the other patches I have just posted to phil-list
> is running on my powermac and passing a lot of the tests.  I am using
> current cvs binutils and current cvs gcc from the gcc-3_3-branch with
> a patch from Alan Modra and Janis Johnson.  I am using a 2.5.64 kernel
> (actually BK from a day or two ago) with some patches that I will send
> to Linus shortly.

I made several TLS_DTV_AT_TP changes very similar to yours as part of IA-64
port. I hope Ulrich will do a new NPTL tarball today so that you can
sync up.

> +/* XXX Until we have a better place keep the definitions here.  */
> +
> +/* While there is no such syscall.  */
> +#define __exit_thread_inline(val) \
> +  INLINE_SYSCALL (exit, 0)

This should be in fact INLINE_SYSCALL (exit, 1, (val)), otherwise you're
exiting with whatever happened to be in corresponding register.

> +-- This could go into powerpc32/ instead and conditionalize #include of it.
> +#ifndef __powerpc64__
> +
> +-- Abuse tls.h macros to derive offsets relative to the thread register.
> +# undef __thread_register
> +# define __thread_register	((void *) 0)
> +# define thread_offsetof(mem)	((void *) &THREAD_SELF->mem - (void *) 0)
> +
> +MULTIPLE_THREADS_OFFSET		thread_offsetof (header.data.multiple_threads)

Current NPTL doesn't have header.data any more, so this will need to
be thread_offsetof (multiple_threads).

> +#ifndef __ASSEMBLER__
> +
> +/* Get system call information.  */
> +# include <sysdep.h>
> +
> +/* Get the thread descriptor definition.  */
> +# include <nptl/descr.h>

This will need to be included after #define TLS_DTV_AT_TP 1, otherwise
you get tcbhead_t in struct pthread.

	Jakub
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.