mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 22:02:27 +00:00
Clean up threading code some more
This commit is contained in:
parent
6a3330d7c9
commit
654ceaba7d
28 changed files with 119 additions and 134 deletions
|
@ -25,6 +25,7 @@
|
|||
#include "libc/intrin/kprintf.h"
|
||||
#include "libc/intrin/weaken.h"
|
||||
#include "libc/runtime/clone.internal.h"
|
||||
#include "libc/runtime/internal.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/runtime/stack.h"
|
||||
#include "libc/str/str.h"
|
||||
|
@ -49,22 +50,6 @@
|
|||
* they're wicked fast and free of bloat if your app is tiny.
|
||||
*/
|
||||
|
||||
// RAW means without *NSYNC
|
||||
// TLS means gettid() is fast
|
||||
|
||||
// PTHREAD_MUTEX_NORMAL RAW TLS took 6ns
|
||||
// PTHREAD_MUTEX_RECURSIVE RAW TLS took 12ns
|
||||
// PTHREAD_MUTEX_ERRORCHECK RAW TLS took 13ns
|
||||
// PTHREAD_MUTEX_NORMAL RAW TLS contended took 16ns (!!)
|
||||
// PTHREAD_MUTEX_RECURSIVE RAW TLS contended took 205ns
|
||||
// PTHREAD_MUTEX_ERRORCHECK RAW TLS contended took 219ns
|
||||
// PTHREAD_MUTEX_NORMAL RAW took 6ns
|
||||
// PTHREAD_MUTEX_RECURSIVE RAW took 236ns
|
||||
// PTHREAD_MUTEX_ERRORCHECK RAW took 233ns
|
||||
// PTHREAD_MUTEX_NORMAL RAW contended took 20ns (!!)
|
||||
// PTHREAD_MUTEX_RECURSIVE RAW contended took 421ns
|
||||
// PTHREAD_MUTEX_ERRORCHECK RAW contended took 435ns
|
||||
|
||||
atomic_int ready;
|
||||
atomic_int counter;
|
||||
atomic_int success;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue