path: root/include/sys/sem.h
AgeCommit message (Collapse)AuthorLines
2019-10-28add time64 symbol name redirects to public headers, under arch controlRich Felker-0/+6
a _REDIR_TIME64 macro is introduced, which the arch's alltypes.h is expected to define, to control redirection of symbol names for interfaces that involve time_t and derived types. this ensures that object files will only be linked to libc interfaces matching the ABI whose headers they were compiled against. along with time32 compat shims, which will be introduced separately, the redirection also makes it possible for a single libc (static or shared) to be used with object files produced with either the old (32-bit time_t) headers or the new ones after 64-bit time_t switchover takes place. mixing of such object files (or shared libraries) in the same program will also be possible, but must be done with care; ABI between libc and a consumer of the libc interfaces is guaranteed to match by the the symbol name redirection, but pairwise ABI between consumers of libc that define interfaces between each other in terms of time_t is not guaranteed to match. this change adds a dependency on an additional "GNU C" feature to the public headers for existing 32-bit archs, which is generally undesirable; however, the feature is one which glibc has depended on for a long time, and thus which any viable alternative compiler is going to need to provide. 64-bit archs are not affected, nor will future 32-bit archs be, regardless of whether they are "new" on the kernel side (e.g. riscv32) or just newly-added (e.g. a new sparc or xtensa port). the same applies to newly-added ABIs for existing machine-level archs.
2019-10-17remove indirect use of endian.h from public headersRich Felker-2/+0
building on commit 97d35a552ec5b6ddf7923dd2f9a8eb973526acea, __BYTE_ORDER is now available wherever alltypes.h is included. endian.h should not be used since, in the future, it will expose identifiers that are not in the reserved namespace for the headers which were previously using it.
2019-08-02allow archs to define IPC_STAT, propagate time64 bit to other macrosRich Felker-2/+2
to make use of {sem,shm,msg}ctl IPC_STAT functionality to provide 64-bit time_t on 32-bit archs, IPC_STAT and related macros must be defined with bit 8 (0x100) set. allow archs to define IPC_STAT in bits/ipc.h, and define the other macros in terms of it so that they all get the same value of the time64 bit.
2018-06-19add {MSG,SEM,SHM}_STAT_ANY from linux v4.17Szabolcs Nagy-0/+1
introduced to stat ipc objects without permission checks since the info is available in /proc/sysvipc anyway, new in linux commits 23c8cec8cf679b10997a512abb1e86f0cedc42ba a280d6dc77eb6002f269d58cd47c7c7e69b617b6 c21a6970ae727839a2f300cd8dd957de0d0238c3
2014-03-11move struct semid_ds to from shared sys/sem.h to bitsRich Felker-16/+1
the definition was found to be incorrect at least for powerpc, and fixing this cleanly requires making the definition arch-specific. this will allow cleaning up the definition for other archs to make it more specific, and reversing some of the ugliness (time_t hacks) introduced with the x32 port. this first commit simply copies the existing definition to each arch without any changes. this is intentional, to make it easier to review changes made on a per-arch basis.
2014-02-22sys/sem.h: cheat and make all longs use time_t insteadrofl0r-8/+8
most of the members should be time_t anyway, and time_t has the correct semantics for "syscall_long", so it works on all archs, even x32.
2013-06-28work around wrong kernel type for sem_nsems member of struct semid_dsRich Felker-1/+9
rejecting invalid values for n is fine even in the case where a new sem will not be created, since the kernel does its range checks on n even in this case as well. by default, the kernel will bound the limit well below USHRT_MAX anyway, but it's presumably possible that an administrator could override this limit and break things.
2012-09-07default features: make musl usable without feature test macrosRich Felker-0/+2
the old behavior of exposing nothing except plain ISO C can be obtained by defining __STRICT_ANSI__ or using a compiler option (such as -std=c99) that predefines it. the new default featureset is POSIX with XSI plus _BSD_SOURCE. any explicit feature test macros will inhibit the default. installation docs have also been updated to reflect this change.
2012-08-24type exposure fixes in sys/sem.hRich Felker-2/+5
2011-02-12initial check-in, version 0.5.0v0.5.0Rich Felker-0/+69