Clean up some of the threading code

This commit is contained in:
Justine Tunney 2022-09-08 11:54:56 -07:00
parent 0547eabcd6
commit 9f963dc597
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
62 changed files with 175 additions and 582 deletions

View file

@ -21,11 +21,6 @@
/**
* Acquires spin lock.
*
* spin l: 181,570c 58,646ns
* mutex normal l: 297,965c 96,241ns
* mutex recursive l: 1,112,166c 359,223ns
* mutex errorcheck l: 1,449,723c 468,252ns
*
* If the lock is already held, this function will wait for it to become
* available. No genuine error conditions are currently defined. This is
* similar to pthread_mutex_lock() except spin locks are much simpler so
@ -45,7 +40,7 @@
*
* Cosmopolitan permits succinct notation for spin locks:
*
* pthread_spinlock_t lock = 0;
* pthread_spinlock_t lock = {0};
* pthread_spin_lock(&lock);
* // do work...
* pthread_spin_unlock(&lock);