This is the mail archive of the libc-alpha@sourceware.org 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] hppa: Add _STACK_GROWS_* cases to pthread_attr_[sg]etstack.


I happened to skim this patch for some reason, and
noticed ...

On 03/05/2014 05:11 AM, Carlos O'Donell wrote:
> +#if _STACK_GROWS_DOWN
>    iattr->stackaddr = (char *) stackaddr + stacksize;
> +#else
> +  iattr->stackaddr = (char *) stackaddr;
> +#endif
>    iattr->flags |= ATTR_FLAG_STACKADDR;

Used #if here.

> +#if _STACK_GROWS_DOWN
>    iattr->stackaddr = (char *) stackaddr + stacksize;
> +#else
> +  iattr->stackaddr = (char *) stackaddr;
> +#endif
>    iattr->flags |= ATTR_FLAG_STACKADDR;

Used #if here.

>    /* Store the result.  */
> +#ifdef _STACK_GROWS_DOWN
>    *stackaddr = (char *) iattr->stackaddr - iattr->stacksize;
> +#else
> +  *stackaddr = (char *) iattr->stackaddr;

Used #ifdef here -- any particular reason for that?

-- 
Pedro Alves


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