X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/270869139db617e29a35bb9ded41087bb702f9ac..HEAD:/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 */