• Elliott Hughes's avatar
    Avoid a system call in 'gettid'. · 5d9a7ba0
    Elliott Hughes authored
    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
    5d9a7ba0