1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-28 00:21:52 +03:00

nptl: Consolidate sem_open implementations

Current sparc32 sem_open and default one only differ on:

  1. Default one contains a 'futex_supports_pshared' check.
  2. sem.newsem.pad is initialized to zero.

This patch removes sparc32 and sparc32v9 sem_open arch specific
implementation and instead set sparc32 to use nptl default one.
Using 1. is fine since it should always evaluate 0 for Linux
(an optimized away by the compiler). Adding 2. to default
implementation should be ok since 'pad' field is used mainly
on sparc32 code.

I checked on i686 and checked a sparc32v9 build.

	* nptl/sem_open.c (sem_open): Init pad value to 0.
	* sysdeps/sparc/sparc32/sem_open.c: Remove file.
	* sysdeps/sparc/sparc32/sparcv9/sem_open.c: Likewise.
This commit is contained in:
Adhemerval Zanella
2016-08-19 15:30:01 -03:00
parent 80d8cb91de
commit 980d25d53e
4 changed files with 8 additions and 301 deletions

View File

@ -207,6 +207,8 @@ sem_open (const char *name, int oflag, ...)
sem.newsem.data = value;
#else
sem.newsem.value = value << SEM_VALUE_SHIFT;
/* pad is used as a mutex on pre-v9 sparc and ignored otherwise. */
sem.newsem.pad = 0;
sem.newsem.nwaiters = 0;
#endif
/* This always is a shared semaphore. */