Commit Graph

7 Commits

Author SHA1 Message Date
Rich Felker 50a50988d5 remove more unnecessary operand-size suffixes from x86_64 atomic.h 2014-01-15 21:48:44 -05:00
Rich Felker 311736516e remove gratuitous temp vars, casts, and suffixes in x86_64 atomic.h
aside from general cleanup, this should allow the identical atomic.h
file to be used for the upcoming x32 port.
2014-01-11 19:37:09 -05:00
Rich Felker df0b5a4940 security hardening: ensure suid programs have valid stdin/out/err
this behavior (opening fds 0-2 for a suid program) is explicitly
allowed (but not required) by POSIX to protect badly-written suid
programs from clobbering files they later open.

this commit does add some cost in startup code, but the availability
of auxv and the security flag will be useful elsewhere in the future.
in particular auxv is needed for static-linked vdso support, which is
still waiting to be committed (sorry nik!)
2011-08-23 09:37:39 -04:00
Rich Felker 4bb9b4f3b4 add word-sized ctz function to atomic.h
strictly speaking this and a few other ops should be factored into
asm.h or the file should just be renamed to asm.h, but whatever. clean
it up someday.
2011-04-27 12:19:49 -04:00
Rich Felker e914f8b7ec optimize contended normal mutex case; add int compare-and-swap atomic 2011-03-17 12:14:40 -04:00
Nicholas J. Kain 062354f2e1 Optimize x86_64 atomics to take advantage of 64-bitness. 2011-02-15 08:26:46 -05:00
Nicholas J. Kain 1e12632591 Port musl to x86-64. One giant commit! 2011-02-15 07:32:09 -05:00