From 09cb278539d6ebb30a4de89a6bfd8bda1b085c07 Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Thu, 15 Sep 2016 11:21:52 -0300 Subject: nptl: Consolidate sem_init implementations Current sparc32 sem_init and default one only differ on sem.newsem.pad initialization. This patch removes sparc32 and sparc32v9 sem_init arch specific implementation and set sparc32 to use nptl default one. The default implementation sets the required sem.newsem.pad to 0 (which is ununsed in other architectures). I checked on i686 and a sparc32v9 build. * nptl/sem_init.c (sem_init): Init pad value to 0. * sysdeps/sparc/sparc32/sem_init.c: Remove file. * sysdeps/sparc/sparc32/sparcv9/sem_init.c: Likewise. --- nptl/sem_init.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'nptl') diff --git a/nptl/sem_init.c b/nptl/sem_init.c index be0f27dbdf..9380a2176a 100644 --- a/nptl/sem_init.c +++ b/nptl/sem_init.c @@ -49,6 +49,8 @@ __new_sem_init (sem_t *sem, int pshared, unsigned int value) isem->data = value; #else isem->value = value << SEM_VALUE_SHIFT; + /* pad is used as a mutex on pre-v9 sparc and ignored otherwise. */ + isem->pad = 0; isem->nwaiters = 0; #endif -- cgit v1.2.1