summaryrefslogtreecommitdiffstats
path: root/libc/arch-sh/syscalls/__setresuid.S
diff options
context:
space:
mode:
authorMike Chan <mike@android.com>2010-03-02 10:55:58 -0800
committerMike Chan <mike@android.com>2010-03-02 18:18:04 -0800
commit9f6915631b918a56e0e6be958fb14d274cbab322 (patch)
tree5d3b311f885dd053f4b816f69e8961ee21c37938 /libc/arch-sh/syscalls/__setresuid.S
parentbd9a90c443ee4582d2be1a68c6f3a2928d130ce4 (diff)
downloadbionic-9f6915631b918a56e0e6be958fb14d274cbab322.zip
bionic-9f6915631b918a56e0e6be958fb14d274cbab322.tar.gz
bionic-9f6915631b918a56e0e6be958fb14d274cbab322.tar.bz2
bonic: libc: cpuacct support for setuid functions
Any of the setuid functions now updates /acct/uid/ with its own tid before changing users. This is so we can properly account for cpu time per uid. Change-Id: I34186cf4d5228cac8439e582a9e26c01ef3011e4 Signed-off-by: Mike Chan <mike@android.com>
Diffstat (limited to 'libc/arch-sh/syscalls/__setresuid.S')
-rw-r--r--libc/arch-sh/syscalls/__setresuid.S32
1 files changed, 32 insertions, 0 deletions
diff --git a/libc/arch-sh/syscalls/__setresuid.S b/libc/arch-sh/syscalls/__setresuid.S
new file mode 100644
index 0000000..424100e
--- /dev/null
+++ b/libc/arch-sh/syscalls/__setresuid.S
@@ -0,0 +1,32 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+ .text
+ .type __setresuid, @function
+ .globl __setresuid
+ .align 4
+
+__setresuid:
+
+ /* invoke trap */
+ mov.l 0f, r3 /* trap num */
+ trapa #(3 + 0x10)
+
+ /* check return value */
+ cmp/pz r0
+ bt __NR_setresuid32_end
+
+ /* keep error number */
+ sts.l pr, @-r15
+ mov.l 1f, r1
+ jsr @r1
+ mov r0, r4
+ lds.l @r15+, pr
+
+__NR_setresuid32_end:
+ rts
+ nop
+
+ .align 2
+0: .long __NR_setresuid32
+1: .long __set_syscall_errno