X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/14046412dd248f8ae504cf75788edc480f2313d0..4cf445cb569be5f1f078ea27fd5d1b172402f44f:/lunaix-os/includes/lunaix/ds/mutex.h diff --git a/lunaix-os/includes/lunaix/ds/mutex.h b/lunaix-os/includes/lunaix/ds/mutex.h index 510f1fb..304cc6d 100644 --- a/lunaix-os/includes/lunaix/ds/mutex.h +++ b/lunaix-os/includes/lunaix/ds/mutex.h @@ -6,7 +6,7 @@ typedef struct mutex_s { - atomic_ulong lk; + atomic_uint lk; pid_t owner; } mutex_t; @@ -37,4 +37,7 @@ mutex_unlock_nested(mutex_t* mutex); void mutex_unlock_for(mutex_t* mutex, pid_t pid); +bool +mutex_trylock(mutex_t* mutex); + #endif /* __LUNAIX_MUTEX_H */