summaryrefslogtreecommitdiffstats
path: root/libc/arch-sh
diff options
context:
space:
mode:
authorDavid 'Digit' Turner <digit@google.com>2010-09-27 17:28:38 +0200
committerDavid 'Digit' Turner <digit@google.com>2010-09-28 09:17:17 +0200
commita3ae60d343661784e3f6f4566b276d8e6b8a06a7 (patch)
tree08c1d005960477585df8fd5e0a14b421f4767643 /libc/arch-sh
parent307aadb8473744c3d946add8b3e4947ada5481aa (diff)
downloadbionic-a3ae60d343661784e3f6f4566b276d8e6b8a06a7.zip
bionic-a3ae60d343661784e3f6f4566b276d8e6b8a06a7.tar.gz
bionic-a3ae60d343661784e3f6f4566b276d8e6b8a06a7.tar.bz2
libc: Add missing fdatasync() implementation
Change-Id: I04bb655d77e414021e1f2a973329167ad76ca1c4
Diffstat (limited to 'libc/arch-sh')
-rw-r--r--libc/arch-sh/syscalls.mk1
-rw-r--r--libc/arch-sh/syscalls/fdatasync.S32
2 files changed, 33 insertions, 0 deletions
diff --git a/libc/arch-sh/syscalls.mk b/libc/arch-sh/syscalls.mk
index b690bbf..3e2274f 100644
--- a/libc/arch-sh/syscalls.mk
+++ b/libc/arch-sh/syscalls.mk
@@ -75,6 +75,7 @@ syscall_src += arch-sh/syscalls/select.S
syscall_src += arch-sh/syscalls/ftruncate.S
syscall_src += arch-sh/syscalls/getdents.S
syscall_src += arch-sh/syscalls/fsync.S
+syscall_src += arch-sh/syscalls/fdatasync.S
syscall_src += arch-sh/syscalls/fchown.S
syscall_src += arch-sh/syscalls/sync.S
syscall_src += arch-sh/syscalls/__fcntl64.S
diff --git a/libc/arch-sh/syscalls/fdatasync.S b/libc/arch-sh/syscalls/fdatasync.S
new file mode 100644
index 0000000..d81c33a
--- /dev/null
+++ b/libc/arch-sh/syscalls/fdatasync.S
@@ -0,0 +1,32 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+ .text
+ .type fdatasync, @function
+ .globl fdatasync
+ .align 4
+
+fdatasync:
+
+ /* invoke trap */
+ mov.l 0f, r3 /* trap num */
+ trapa #(1 + 0x10)
+
+ /* check return value */
+ cmp/pz r0
+ bt __NR_fdatasync_end
+
+ /* keep error number */
+ sts.l pr, @-r15
+ mov.l 1f, r1
+ jsr @r1
+ mov r0, r4
+ lds.l @r15+, pr
+
+__NR_fdatasync_end:
+ rts
+ nop
+
+ .align 2
+0: .long __NR_fdatasync
+1: .long __set_syscall_errno