summaryrefslogtreecommitdiff
path: root/src/linux
AgeCommit message (Collapse)AuthorFilesLines
2013-05-26fix the prototype of settimeofday to follow the original BSD declarationSzabolcs Nagy1-1/+2
2013-04-07fix signalfd not to ignore flagsRich Felker1-1/+12
also include fallback code for broken kernels that don't support the flags. as usual, the fallback has a race condition that can leak file descriptors.
2013-03-26remove __SYSCALL_SSLEN arch macro in favor of using public _NSIGRich Felker3-3/+6
the issue at hand is that many syscalls require as an argument the kernel-ABI size of sigset_t, intended to allow the kernel to switch to a larger sigset_t in the future. previously, each arch was defining this size in syscall_arch.h, which was redundant with the definition of _NSIG in bits/signal.h. as it's used in some not-quite-portable application code as well, _NSIG is much more likely to be recognized and understood immediately by someone reading the code, and it's also shorter and less cluttered. note that _NSIG is actually 65/129, not 64/128, but the division takes care of throwing away the off-by-one part.
2012-12-07remove __arch_prctl alias for arch_prctlRich Felker1-3/+1
if there's evidence of any use for it, we can add it back later. as far as I can tell, glibc has it only for internal use (and musl uses a direct syscall in that case rather than a function call), not for exposing it to applications.
2012-12-07move new linux syscall wrapper functions to proper source dirRich Felker2-0/+16
2012-11-18add port io functions to sys/io.hRich Felker2-2/+4
based on proposal by Isaac Dunham. nonexistance of bits/io.h will cause inclusion of sys/io.h to produce an error on archs that are not supposed to have it. this is probably the desired behavior, but the error message may be a bit unusual.
2012-11-04mips cache flush/ctl syscall support and headerRich Felker1-0/+18
2012-09-29move accept4, dup3, and pipe2 to non-linux-specific locationsRich Felker3-27/+0
these interfaces have been adopted by the Austin Group for inclusion in the next version of POSIX.
2012-09-29fix some indention-with-spaces that crept inRich Felker2-4/+4
2012-09-21LFS64 alias for prlimitRich Felker1-0/+3
issue reported/requested by Justin Cormack
2012-09-16add clock_adjtime, remap_file_pages, and syncfs syscall wrappersRich Felker3-0/+25
patch by Justin Cormack, with slight modification
2012-09-10fix another ppoll issue (missing sigset_t size argument)Rich Felker1-1/+1
2012-09-10fix ppoll with null timeout argumentRich Felker1-2/+2
2012-09-09add linux ppoll syscall wrapperRich Felker1-0/+9
2012-09-09reenable sync_file_range; should no longer break on mipsRich Felker1-2/+2
2012-09-08disable sync_file_range for nowRich Felker1-2/+3
something is wrong with the logic for the argument layout, resulting in compile errors on mips due to too many args to syscall... further information on how it's supposed to work will be needed before it can be reactivated.
2012-09-08add acct, accept4, setns, and dup3 syscalls (linux extensions)Rich Felker3-0/+28
based on patch by Justin Cormack
2012-09-08add linux tee syscallRich Felker1-0/+8
2012-09-08add linux sync_file_range syscallRich Felker1-0/+16
2012-09-08move fallocate syscall wrapper to linux-specific syscalls dirRich Felker1-0/+9
2012-09-08add linux readahead syscallRich Felker1-0/+8
2012-09-08add timerfd interfaces (untested)Rich Felker1-0/+17
2012-09-07cleanup src/linux and src/misc trees, etc.Rich Felker31-404/+107
previously, it was pretty much random which one of these trees a given function appeared in. they have now been organized into: src/linux: non-POSIX linux syscalls (possibly shard with other nixen) src/legacy: various obsolete/legacy functions, mostly wrappers src/misc: still mostly uncategorized; some misc POSIX, some nonstd src/crypt: crypt hash functions further cleanup will be done later.
2012-09-06further use of _Noreturn, for non-plain-C functionsRich Felker1-4/+4
note that POSIX does not specify these functions as _Noreturn, because POSIX is aligned with C99, not the new C11 standard. when POSIX is eventually updated to C11, it will almost surely give these functions the _Noreturn attribute. for now, the actual _Noreturn keyword is not used anyway when compiling with a c99 compiler, which is what POSIX requires; the GCC __attribute__ is used instead if it's available, however. in a few places, I've added infinite for loops at the end of _Noreturn functions to silence compiler warnings. presumably __buildin_unreachable could achieve the same thing, but it would only work on newer GCCs and would not be portable. the loops should have near-zero code size cost anyway. like the previous _Noreturn commit, this one is based on patches contributed by philomath.
2012-08-15handle null arguments to legacy bsd err.h functionsRich Felker1-2/+2
2012-08-15add missing xattr functionsRich Felker1-0/+15
not sure why these were originally omitted..
2012-08-09fix (hopefully) all hard-coded 8's for kernel sigset_t sizeRich Felker2-2/+2
some minor changes to how hard-coded sets for thread-related purposes are handled were also needed, since the old object sizes were not necessarily sufficient. things have gotten a bit ugly in this area, and i think a cleanup is in order at some point, but for now the goal is just to get the code working on all supported archs including mips, which was badly broken by linux rejecting syscalls with the wrong sigset_t size.
2012-07-23add ioperm/iopl syscallsRich Felker2-0/+18
based on patches by orc and Isaac Dunham, with some fixes. sys/io.h exists and contains prototypes for these functions regardless of whether the target arch has them; this is a bit unorthodox but I don't think it will break anything. the function definitions do not exist unless the appropriate SYS_* syscall number macro is defined, which should make sure configure scripts looking for these functions don't find them on other systems. presently, sys/io.h does not have the inb/outb/etc. port io macros/functions. I'd be surprised if ioperm/iopl are useful without them, so they probably need to be added at some point in appropriate bits/io.h files...
2012-07-23add splice and vmsplice syscallsRich Felker2-0/+16
based on patches by orc and Isaac Dunham.
2012-07-23add extended attributes syscallsRich Felker1-0/+47
based on patch by orc and Isaac Dunham, with some fixes.
2012-07-23add pipe2 syscallRich Felker1-0/+8
based on patch by orc and Isaac Dunham, with some details fixed.
2012-06-23add process_vm_readv and process_vm_writev syscall wrappersRich Felker1-0/+13
based on a patch submitted by Kristian L. <email@thexception.net>
2012-06-19add vhangup syscall wrapperRich Felker1-0/+8
request/patch by william haddonthethird, slightly modifed to add _GNU_SOURCE feature test macro so that the compiler can verify the prototype matches.
2012-06-13add init_module/delete_module syscall wrappersRich Felker1-0/+11
these are not exposed publicly in any header, but the few programs that use them (modutils/kmod, etc.) are declaring the functions themselves rather than making the syscalls directly, and it doesn't really hurt to have them (same as the capset junk).
2012-06-13add deprecated capabilities functionsRich Felker1-0/+11
these were left in glibc for binary compatibility after the public part of the interface was removed, and libcap kept using them (with its own copy of the header files) rather than just making the syscalls directly. might as well add them since they're so small...
2012-05-21fix typo in utimes function that made it mess up file timesRich Felker1-1/+1
2012-04-29add linux-specific unshare syscall wrapperRich Felker1-0/+8
2012-04-18legacy junk compatibility grab-bagRich Felker1-0/+1
- add the rest of the junk traditionally in sys/param.h - add prototypes for some nonstandard functions - add _GNU_SOURCE to their source files so the compiler can check proto
2012-03-16remove junk sincos implementations in preparation to merge nsz's real onesRich Felker3-24/+0
2012-03-15implement sincosf and sincosl functions; add prototypesRich Felker2-0/+16
presumably broken gcc may generate calls to these, and it's said that ffmpeg makes use of sincosf.
2012-01-28add linux setfs[ug]id syscall wrappersRich Felker2-0/+16
patch by Jeremy Huntwork
2011-12-23fix broken reboot wrapper (syscall needs extra silly magic arguments...)Rich Felker1-1/+1
2011-09-28make getmntent_r discard long lines when it returns error, not seek backRich Felker1-2/+1
seeking back can be performed by the caller, but if the caller doesn't expect it, it will result in an infinite loop of failures.
2011-09-27improve error handling in mntent stuff...Rich Felker1-2/+9
not sure if this is correct/ideal. it needs further attention.
2011-09-27fix missing va_end in prctl syscall wrapperRich Felker1-0/+1
2011-09-26cleanup various minor issues reported by nszRich Felker1-2/+2
the changes to syscall_ret are mostly no-ops in the generated code, just cleanup of type issues and removal of some implementation-defined behavior. the one exception is the change in the comparison value, which is fixed so that 0xf...f000 (which in principle could be a valid return value for mmap, although probably never in reality) is not treated as an error return.
2011-08-02fix stubbed-out reboot callRich Felker1-3/+2
2011-05-22fix brk/sbrk behavior to match the real legacy functionsRich Felker2-2/+4
2011-05-08eventfd syscall wrapper and read/write wrappersRich Felker3-0/+21
2011-04-20fix initgroups (uninitialized count passed to getgrouplist)Rich Felker1-1/+1