summaryrefslogtreecommitdiffstats
path: root/libc/arch-x86/syscalls
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2014-05-30 19:00:03 -0700
committerElliott Hughes <enh@google.com>2014-06-02 10:32:55 -0700
commit5d9a7ba0dc9c24ed4e4efa9cac0e796fd524b308 (patch)
tree4674df3b5064cb38211453b6e887c364f0c66f05 /libc/arch-x86/syscalls
parent831405b749d15a11fb947a40d61fd858e952d860 (diff)
downloadbionic-5d9a7ba0dc9c24ed4e4efa9cac0e796fd524b308.zip
bionic-5d9a7ba0dc9c24ed4e4efa9cac0e796fd524b308.tar.gz
bionic-5d9a7ba0dc9c24ed4e4efa9cac0e796fd524b308.tar.bz2
Avoid a system call in 'gettid'.
System calls can be pretty slow. This is mako, which has one of our lowest latencies: iterations ns/op BM_unistd_getpid 10000000 209 BM_unistd_gettid 200000000 8 Bug: 15297299 (kernel panic from too many gettid calls) Bug: 15315766 (excessive gettid overhead in liblogd) Change-Id: I49656c0fc5b5d092390264a59e4f2c0d8a8b1aeb
Diffstat (limited to 'libc/arch-x86/syscalls')
-rw-r--r--libc/arch-x86/syscalls/gettid.S17
1 files changed, 0 insertions, 17 deletions
diff --git a/libc/arch-x86/syscalls/gettid.S b/libc/arch-x86/syscalls/gettid.S
deleted file mode 100644
index 1f264b1..0000000
--- a/libc/arch-x86/syscalls/gettid.S
+++ /dev/null
@@ -1,17 +0,0 @@
-/* Generated by gensyscalls.py. Do not edit. */
-
-#include <private/bionic_asm.h>
-
-ENTRY(gettid)
- movl $__NR_gettid, %eax
- int $0x80
- cmpl $-MAX_ERRNO, %eax
- jb 1f
- negl %eax
- pushl %eax
- call __set_errno
- addl $4, %esp
- orl $-1, %eax
-1:
- ret
-END(gettid)