summaryrefslogtreecommitdiff
path: root/src/syscall-generic.h
Commit message (Collapse)AuthorAgeFilesLines
* Change syscall-arm64.h to syscall-generic.hIcenowy Zheng2018-03-051-0/+11
| | | | | | | | | | | | The arm64 architecture support in Linux kernel just adapted the new generic syscall number schema, which is shared between most new architectures. Change syscall-arm64.h to syscall-generic.h, in order to ease the addition of support for new architectures. Signed-off-by: Icenowy Zheng <icenowy@aosc.io> Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
* syscall: get rid of custom syscall implementationsyscall-refactorJeff Moyer2018-01-121-35/+0
| | | | | | | | | | | | | | | | | | | | | | | | | Maintaining the custom system call code for each architecture is a burden. I'm not convinced that we have clobber registers correct, and at best, we are just duplicating work that has already been done by the glibc maintainers. I asked Ben what the reasoning was behind not just using syscall. This was his answer: The main issue was that glibc's pthreads implementation really sucked back during initial development and there was a use-case for having the io_XXX functions usable directly from clone()ed threads that didn't have all the glibc pthread state setup for per-cpu areas to handle per-thread errno. That made sense back then, but is rather silly today. This patch gets rid of the architecture specific system call wrappers in favor of using syscall(). We leave the per-arch header files with the syscall numbers because we'll be adding a new system call soon, and this will allow us to add the new number without requiring newer kernels on build servers. Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
* syscall-generic: don't overwrite errnoJeff Moyer2018-01-121-4/+10
| | | | | | The io_* system calls should not touch errno. Fix it. Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
* add a generic syscall() fallbackMike Frysinger2013-01-311-0/+29
Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Jeff Moyer <jmoyer@redhat.com>