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]

Need for arch pthread-offsets.h (was Re: [PATCH v2 05/15] ARC: Atomics and Locking primitives)


On 1/30/19 9:40 AM, Vineet Gupta wrote:
> On 1/30/19 12:28 AM, Andreas Schwab wrote:
>> On Jan 29 2019, Vineet Gupta <vineet.gupta1@synopsys.com> wrote:
>>
>>> +#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND  1
>>> +#define __PTHREAD_MUTEX_USE_UNION          1
>> New ports should use the preferred values for these macros.
> 
> OK, changed to 0 and 0 per commit 06be6368da16104 ("nptl: Define
> __PTHREAD_MUTEX_{NUSERS_AFTER_KIND,USE_UNION}")

So this required a bunch of tricking changes to _SIZEOF_PTHREAD_*.

However what was not obvious is adjustment to
sysdeps/<arch>/nptl/pthread-offsets.h to __PTHREAD_MUTEX_*_OFFSET. But these don't
seem to be *actually* used anywhere. Sure there are assert checks in
pthread_mutext_init.c but what's the point: the struct is generic anyways. IOW I'm
not sure what port specific errors/inconsistency they are catching, other than the
fact that they need to be hand calculating when starting a new port.

Am I missing something ?


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