about summary refs log tree commit diff
path: root/src/linux
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2012-09-16 22:26:23 -0400
committerRich Felker <dalias@aerifal.cx>2012-09-16 22:26:23 -0400
commit662da62eb7cba808e98fe8ea65f6bbf55fa50f1e (patch)
tree95e2e2b286336f5cde1c75e86689236c0e5a2ccf /src/linux
parentbd261bf25e000a1b754616db0b2ee1e14835a75d (diff)
downloadmusl-662da62eb7cba808e98fe8ea65f6bbf55fa50f1e.tar.gz
musl-662da62eb7cba808e98fe8ea65f6bbf55fa50f1e.tar.xz
musl-662da62eb7cba808e98fe8ea65f6bbf55fa50f1e.zip
add clock_adjtime, remap_file_pages, and syncfs syscall wrappers
patch by Justin Cormack, with slight modification
Diffstat (limited to 'src/linux')
-rw-r--r--src/linux/clock_adjtime.c9
-rw-r--r--src/linux/remap_file_pages.c8
-rw-r--r--src/linux/syncfs.c8
3 files changed, 25 insertions, 0 deletions
diff --git a/src/linux/clock_adjtime.c b/src/linux/clock_adjtime.c
new file mode 100644
index 00000000..1fc9bef4
--- /dev/null
+++ b/src/linux/clock_adjtime.c
@@ -0,0 +1,9 @@
+#define _GNU_SOURCE
+#include <time.h>
+#include <sys/timex.h>
+#include "syscall.h"
+
+int clock_adjtime (clockid_t clock_id, struct timex *utx)
+{
+	return syscall(SYS_clock_adjtime, clock_id, utx);
+}
diff --git a/src/linux/remap_file_pages.c b/src/linux/remap_file_pages.c
new file mode 100644
index 00000000..f95c4cc3
--- /dev/null
+++ b/src/linux/remap_file_pages.c
@@ -0,0 +1,8 @@
+#define _GNU_SOURCE
+#include <sys/mman.h>
+#include "syscall.h"
+
+int remap_file_pages(void *addr, size_t size, int prot, ssize_t pgoff, int flags)
+{
+	return syscall(SYS_remap_file_pages, addr, size, prot, pgoff, flags);
+}
diff --git a/src/linux/syncfs.c b/src/linux/syncfs.c
new file mode 100644
index 00000000..fe2b8a70
--- /dev/null
+++ b/src/linux/syncfs.c
@@ -0,0 +1,8 @@
+#define _GNU_SOURCE
+#include <unistd.h>
+#include "syscall.h"
+
+void syncfs(int fd)
+{
+	__syscall(SYS_syncfs, fd);
+}