glibc/sysdeps/htl
Florian Weimer e9fed2438a linux: Require /dev/shm as the shared memory file system
Previously, glibc would pick an arbitrary tmpfs file system from
/proc/mounts if /dev/shm was not available.  This could lead to
an unsuitable file system being picked for the backing storage for
shm_open, sem_open, and related functions.

This patch introduces a new function, __shm_get_name, which builds
the file name under the appropriate (now hard-coded) directory.  It is
called from the various shm_* and sem_* function.  Unlike the
SHM_GET_NAME macro it replaces, the callers handle the return values
and errno updates.  shm-directory.c is moved directly into the posix
subdirectory because it can be implemented directly using POSIX
functionality.  It resides in libc because it is needed by both
librt and nptl/htl.

In the sem_open implementation, tmpfname is initialized directly
from a string constant.  This happens to remove one alloca call.

Checked on x86_64-linux-gnu.
2021-02-08 14:10:42 -03:00
..
bits Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
include htl: Add wrapper header for <semaphore.h> with hidden __sem_post 2020-06-24 13:38:08 +02:00
flockfile.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
fork.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ftrylockfile.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
funlockfile.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
futex-internal.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
Implies
libc-lock.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
libc-lockP.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
Makeconfig hurd: Remove some remnants of cthreads 2020-11-15 13:16:03 +01:00
Makefile htl: Add __errno_location and __h_errno_location 2020-01-04 19:37:53 +01:00
old_pt-atfork.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-atfork.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-attr-destroy.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-attr-getdetachstate.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-attr-getguardsize.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-attr-getinheritsched.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-attr-getschedparam.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-attr-getschedpolicy.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-attr-getscope.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-attr-getstack.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-attr-getstackaddr.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-attr-getstacksize.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-attr-init.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-attr-setdetachstate.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-attr-setguardsize.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-attr-setinheritsched.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-attr-setschedparam.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-attr-setschedpolicy.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-attr-setscope.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-attr-setstack.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-attr-setstackaddr.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-attr-setstacksize.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-attr.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-barrier-destroy.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-barrier-init.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-barrier-wait.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-barrier.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-barrierattr-destroy.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-barrierattr-getpshared.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-barrierattr-init.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-barrierattr-setpshared.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-cond-brdcast.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-cond-destroy.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-cond-init.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-cond-signal.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-cond-timedwait.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-cond-wait.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-cond.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-condattr-destroy.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-condattr-getclock.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-condattr-getpshared.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-condattr-init.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-condattr-setclock.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-condattr-setpshared.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-destroy-specific.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-equal.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-getconcurrency.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-getcpuclockid.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-getschedparam.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-getspecific.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-init-specific.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-key-create.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-key-delete.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-key.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-once.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-rwlock-attr.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-rwlock-destroy.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-rwlock-init.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-rwlock-rdlock.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-rwlock-timedrdlock.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-rwlock-timedwrlock.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-rwlock-tryrdlock.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-rwlock-trywrlock.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-rwlock-unlock.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-rwlock-wrlock.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-rwlockattr-destroy.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-rwlockattr-getpshared.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-rwlockattr-init.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-rwlockattr-setpshared.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-setconcurrency.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-setschedparam.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-setschedprio.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-setspecific.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pt-startup.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pthread-functions.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pthread.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pthreadP.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
raise.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
sem-destroy.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
sem-getvalue.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
sem-init.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
sem-post.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
sem-timedwait.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
sem-trywait.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
sem-wait.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
sem-waitfast.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
stdio-lock.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
Subdirs
thrd_current.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
timer_routines.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
Versions