This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] PPC enable Altivec for setjmp/longjmp part 1 of 5

Hash: SHA1

Steve Munroe wrote:

> -typedef long int __jmp_buf[58];
> +/* The alignment is not essential, i.e.the buffer can be copied to a 4 byte aligned buffer as per the ABI it is just added for performance reasons.  */
> +typedef long int __jmp_buf[64+(12*4)] __attribute__((aligned(16)));
>  # endif
>  #endif

Add some newline to the comment, it's far too wide.

> +extern void __vmx__longjmp (__jmp_buf __env, int __val);
> +extern void __vmx__libc_longjmp (sigjmp_buf env, int val)
> +     __attribute__ ((noreturn));
> +libc_hidden_proto (__vmx__libc_longjmp)

Why does __vmx_longjmp not have the noreturn attribute?

> diff -urN libc23-cvstip-20040210/sysdeps/powerpc/novmxsetjmp.h libc23/sysdeps/powerpc/novmxsetjmp.h

This is an internal header (I thought this was clear after Roland's
comments) but still you use

> +#ifndef	_SETJMP_H
> +#define	_SETJMP_H	1
> +
> +#include <features.h>
> +

...all this.  None should be needed, maybe the include protection, but
then the sources aren't cleanly structured.

> +#if defined __USE_MISC || defined _ASM

What does __USE_* have to do in an internal header?  It's always
defined.  You can keep the _ASM if it is really used.  But is it?

> +/* Calling environment, plus possibly a saved signal mask.  */
> +typedef struct __jmp_buf_tag	/* C++ doesn't like tagless structs.  */
> +  {
> +    /* NOTE: The machine-dependent definitions of `__sigsetjmp'
> +       assume that a `jmp_buf' begins with a `__jmp_buf' and that
> +       `__mask_was_saved' follows it.  Do not move these members
> +       or add others before it.  */
> +    __jmp_buf __jmpbuf;		/* Calling environment.  */
> +    int __mask_was_saved;	/* Saved the signal mask?  */
> +    __sigset_t __saved_mask;	/* Saved signal mask.  */
> +  } jmp_buf[1];

How does this work together with the external definition in <setjmp.h>?

Plus: the C++ comment doesn't apply, glibc is written in C.

I am insistent on this because none of these setjmp changes must be
visible to the outside.  Nobody must even think about using the internal
headers outside libc.

- -- 
â Ulrich Drepper â Red Hat, Inc. â 444 Castro St â Mountain View, CA â
Version: GnuPG v1.2.3 (GNU/Linux)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]