diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2016-09-15 11:21:52 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2016-09-15 16:31:50 -0300 |
commit | 09cb278539d6ebb30a4de89a6bfd8bda1b085c07 (patch) | |
tree | b3380b0de0a9eed5c55792a6057515fd368d3582 /nptl | |
parent | fbc994921b459d57b681a926780933a20745edf5 (diff) | |
download | glibc-09cb278539d6ebb30a4de89a6bfd8bda1b085c07.tar.gz |
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.
Diffstat (limited to 'nptl')
-rw-r--r-- | nptl/sem_init.c | 2 |
1 files changed, 2 insertions, 0 deletions
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 |