mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-23 01:53:46 +01:00
53e1ffbbce
in a separate word from the _count. This does not permit both items to be updated atomically in a portable manner. As a result, sem_post() must always perform a system call to safely clear _has_waiters. This change removes the _has_waiters field and instead uses the high bit of _count as the _has_waiters flag. A new umtx object type (_usem2) and two new umtx operations are added (SEM_WAIT2 and SEM_WAKE2) to implement these semantics. The older operations are still supported under the COMPAT_FREEBSD9/10 options. The POSIX semaphore API in libc has been updated to use the new implementation. Note that the new implementation is not compatible with the previous implementation. However, this only affects static binaries (which cannot be helped by symbol versioning). Binaries using a dynamic libc will continue to work fine. SEM_MAGIC has been bumped so that mismatched binaries will error rather than corrupting a shared semaphore. In addition, a padding field has been added to sem_t so that it remains the same size. Differential Revision: https://reviews.freebsd.org/D961 Reported by: adrian Reviewed by: kib, jilles (earlier version) Sponsored by: Norse |
||
---|---|---|
.. | ||
amd64-fbsd32.c | ||
amd64-fbsd.c | ||
amd64-linux32.c | ||
amd64linux32.conf | ||
arm-fbsd.c | ||
extern.h | ||
fbsd32.conf | ||
i386-fbsd.c | ||
i386-linux.c | ||
i386.conf | ||
i386linux.conf | ||
main.c | ||
Makefile | ||
mips-fbsd.c | ||
powerpc64-fbsd.c | ||
powerpc-fbsd.c | ||
setup.c | ||
sparc64-fbsd.c | ||
syscall.h | ||
syscalls.c | ||
truss.1 | ||
truss.h |