summaryrefslogtreecommitdiffstats
path: root/libc/arch-sh
diff options
context:
space:
mode:
authorSan Mehat <san@google.com>2010-02-23 15:55:29 -0800
committerSan Mehat <san@google.com>2010-02-23 15:55:29 -0800
commit75c5e25ae3615c34f4bcc7dcbe9b29e548e26b9c (patch)
treea5e9210444c3974d51c8e24d2ad0b6c256c0cbf6 /libc/arch-sh
parentb55462328f7f7468bb8c0cb44ad1069af30415a3 (diff)
downloadbionic-75c5e25ae3615c34f4bcc7dcbe9b29e548e26b9c.zip
bionic-75c5e25ae3615c34f4bcc7dcbe9b29e548e26b9c.tar.gz
bionic-75c5e25ae3615c34f4bcc7dcbe9b29e548e26b9c.tar.bz2
bionic: syscalls: Add ioprio_set/ioprio_get syscall wrappers
Signed-off-by: San Mehat <san@google.com>
Diffstat (limited to 'libc/arch-sh')
-rw-r--r--libc/arch-sh/syscalls.mk2
-rw-r--r--libc/arch-sh/syscalls/ioprio_get.S32
-rw-r--r--libc/arch-sh/syscalls/ioprio_set.S32
3 files changed, 66 insertions, 0 deletions
diff --git a/libc/arch-sh/syscalls.mk b/libc/arch-sh/syscalls.mk
index d3e531e..ac12ae4 100644
--- a/libc/arch-sh/syscalls.mk
+++ b/libc/arch-sh/syscalls.mk
@@ -139,6 +139,8 @@ syscall_src += arch-sh/syscalls/sched_getparam.S
syscall_src += arch-sh/syscalls/sched_get_priority_max.S
syscall_src += arch-sh/syscalls/sched_get_priority_min.S
syscall_src += arch-sh/syscalls/sched_rr_get_interval.S
+syscall_src += arch-sh/syscalls/ioprio_set.S
+syscall_src += arch-sh/syscalls/ioprio_get.S
syscall_src += arch-sh/syscalls/uname.S
syscall_src += arch-sh/syscalls/__wait4.S
syscall_src += arch-sh/syscalls/umask.S
diff --git a/libc/arch-sh/syscalls/ioprio_get.S b/libc/arch-sh/syscalls/ioprio_get.S
new file mode 100644
index 0000000..802eb91
--- /dev/null
+++ b/libc/arch-sh/syscalls/ioprio_get.S
@@ -0,0 +1,32 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+ .text
+ .type ioprio_get, @function
+ .globl ioprio_get
+ .align 4
+
+ioprio_get:
+
+ /* invoke trap */
+ mov.l 0f, r3 /* trap num */
+ trapa #(2 + 0x10)
+
+ /* check return value */
+ cmp/pz r0
+ bt __NR_ioprio_get_end
+
+ /* keep error number */
+ sts.l pr, @-r15
+ mov.l 1f, r1
+ jsr @r1
+ mov r0, r4
+ lds.l @r15+, pr
+
+__NR_ioprio_get_end:
+ rts
+ nop
+
+ .align 2
+0: .long __NR_ioprio_get
+1: .long __set_syscall_errno
diff --git a/libc/arch-sh/syscalls/ioprio_set.S b/libc/arch-sh/syscalls/ioprio_set.S
new file mode 100644
index 0000000..209d756
--- /dev/null
+++ b/libc/arch-sh/syscalls/ioprio_set.S
@@ -0,0 +1,32 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+ .text
+ .type ioprio_set, @function
+ .globl ioprio_set
+ .align 4
+
+ioprio_set:
+
+ /* invoke trap */
+ mov.l 0f, r3 /* trap num */
+ trapa #(3 + 0x10)
+
+ /* check return value */
+ cmp/pz r0
+ bt __NR_ioprio_set_end
+
+ /* keep error number */
+ sts.l pr, @-r15
+ mov.l 1f, r1
+ jsr @r1
+ mov r0, r4
+ lds.l @r15+, pr
+
+__NR_ioprio_set_end:
+ rts
+ nop
+
+ .align 2
+0: .long __NR_ioprio_set
+1: .long __set_syscall_errno