[PATCH] Update to new generic semaphore algorithm v2

Steve Ellcey sellcey@imgtec.com
Thu Jan 22 17:19:00 GMT 2015


On Thu, 2015-01-22 at 08:54 -0800, Steve Ellcey wrote:

> Torvald,  I think this patch has broken the MIPS build.  I get a bunch
> of failures, they start with the new file (sem_waitcommon.c).  It looks
> like some kind of 32/64 bit issue with the size of semaphores.  Any
> ideas on how to fix this?

It looks like MIPS has a problem with the size of a semaphore is in
its N32 ABI.  

We have this in sysdeps/mips/bits/atomic.h

#if _MIPS_SIM == _ABIO32
#define __HAVE_64B_ATOMICS 0
#else
#define __HAVE_64B_ATOMICS 1
#endif

And this in sysdeps/mips/nptl/bits/semaphore.h

#if _MIPS_SIM == _ABI64
# define __SIZEOF_SEM_T 32
#else
# define __SIZEOF_SEM_T 16
#endif


So for _ABIN32 we are setting __HAVE_64B_ATOMICS to 1 but still using 32
bit semaphores.  I am not sure which ifdef to change.

Steve Ellcey



More information about the Libc-alpha mailing list