[PATCH] Update to new generic semaphore algorithm v2
Steve Ellcey
sellcey@imgtec.com
Thu Jan 22 16:54:00 GMT 2015
On Tue, 2015-01-13 at 02:15 +0100, Torvald Riegel wrote:
> This patch is a revision of that patch:
> https://sourceware.org/ml/libc-alpha/2014-12/msg00527.html
>
> OK?
> 2015-01-13 Torvald Riegel <triegel@redhat.com>
>
> [BZ #12674]
> * nptl/sem_waitcommon.c: New file. Implement new semaphore algorithm.
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?
In file included from ../sysdeps/nptl/lowlevellock.h:22:0,
from ../nptl/descr.h:30,
from ../sysdeps/mips/nptl/tls.h:73,
from ../include/errno.h:27,
from sem_waitcommon.c:20,
from sem_wait.c:20:
sem_waitcommon.c: In function �~@~X__sem_wait_cleanup�~@~Y:
sem_waitcommon.c:190:47: error: left shift count >= width of type
[-Werror=shift-count-overflow]
atomic_fetch_add_relaxed (&sem->data, -(1UL << SEM_NWAITERS_SHIFT));
^
../include/atomic.h:617:31: note: in definition of macro
�~@~Xatomic_fetch_add_relaxed�~@~Y
__atomic_fetch_add ((mem), (operand), __ATOMIC_RELAXED); })
^
sem_waitcommon.c: In function �~@~X__new_sem_wait_slow�~@~Y:
sem_waitcommon.c:267:11: error: left shift count >= width of type
[-Werror=shift-count-overflow]
1UL << SEM_NWAITERS_SHIFT);
Steve Ellcey
sellcey@imgtec.com
More information about the Libc-alpha
mailing list