summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kern/mutex.h6
-rw-r--r--kern/mutex_i.h4
-rw-r--r--kern/rtmutex.h6
-rw-r--r--kern/rtmutex_i.h4
4 files changed, 10 insertions, 10 deletions
diff --git a/kern/mutex.h b/kern/mutex.h
index c8ae4639..f9fcd35a 100644
--- a/kern/mutex.h
+++ b/kern/mutex.h
@@ -98,7 +98,7 @@ mutex_trylock(struct mutex *mutex)
{
unsigned int state;
- state = mutex_tryacquire(mutex);
+ state = mutex_lock_fast(mutex);
if (state == MUTEX_UNLOCKED) {
return 0;
@@ -120,7 +120,7 @@ mutex_lock(struct mutex *mutex)
{
unsigned int state;
- state = mutex_tryacquire(mutex);
+ state = mutex_lock_fast(mutex);
if (state == MUTEX_UNLOCKED) {
return;
@@ -142,7 +142,7 @@ mutex_unlock(struct mutex *mutex)
{
unsigned int state;
- state = mutex_release(mutex);
+ state = mutex_unlock_fast(mutex);
if (state != MUTEX_LOCKED) {
assert(state == MUTEX_CONTENDED);
diff --git a/kern/mutex_i.h b/kern/mutex_i.h
index 69131cf8..d80cab21 100644
--- a/kern/mutex_i.h
+++ b/kern/mutex_i.h
@@ -29,13 +29,13 @@
#define MUTEX_CONTENDED 2
static inline unsigned int
-mutex_tryacquire(struct mutex *mutex)
+mutex_lock_fast(struct mutex *mutex)
{
return atomic_cas_seq_cst(&mutex->state, MUTEX_UNLOCKED, MUTEX_LOCKED);
}
static inline unsigned int
-mutex_release(struct mutex *mutex)
+mutex_unlock_fast(struct mutex *mutex)
{
unsigned int state;
diff --git a/kern/rtmutex.h b/kern/rtmutex.h
index b9c63ef6..86c3793b 100644
--- a/kern/rtmutex.h
+++ b/kern/rtmutex.h
@@ -56,7 +56,7 @@ rtmutex_trylock(struct rtmutex *rtmutex)
{
uintptr_t prev_owner;
- prev_owner = rtmutex_tryacquire(rtmutex);
+ prev_owner = rtmutex_lock_fast(rtmutex);
if (prev_owner == 0) {
return 0;
@@ -79,7 +79,7 @@ rtmutex_lock(struct rtmutex *rtmutex)
{
uintptr_t prev_owner;
- prev_owner = rtmutex_tryacquire(rtmutex);
+ prev_owner = rtmutex_lock_fast(rtmutex);
if (prev_owner == 0) {
return;
@@ -99,7 +99,7 @@ rtmutex_unlock(struct rtmutex *rtmutex)
{
uintptr_t prev_owner;
- prev_owner = rtmutex_tryrelease(rtmutex);
+ prev_owner = rtmutex_unlock_fast(rtmutex);
if (!(prev_owner & RTMUTEX_CONTENDED)) {
return;
diff --git a/kern/rtmutex_i.h b/kern/rtmutex_i.h
index 8825b047..d34fb5f4 100644
--- a/kern/rtmutex_i.h
+++ b/kern/rtmutex_i.h
@@ -51,7 +51,7 @@
assert(((owner) & ~RTMUTEX_OWNER_MASK) == 0)
static inline uintptr_t
-rtmutex_tryacquire(struct rtmutex *rtmutex)
+rtmutex_lock_fast(struct rtmutex *rtmutex)
{
uintptr_t owner;
@@ -61,7 +61,7 @@ rtmutex_tryacquire(struct rtmutex *rtmutex)
}
static inline uintptr_t
-rtmutex_tryrelease(struct rtmutex *rtmutex)
+rtmutex_unlock_fast(struct rtmutex *rtmutex)
{
uintptr_t owner, prev_owner;