std :: async::sync
#include <std/async/sync.h> source
#include <std/async/sync.h>
struct AsyncMutex { int locked; struct WaitList waiters; struct Spinlock lk; }
int locked
struct WaitList waiters
struct Spinlock lk
static struct AsyncMutex new()
struct MutexLock lock()
Future: Ready once this task holds the lock.
int try_lock()
1 if acquired
void unlock()
and wake a waiter
int is_locked() const