diff options
author | Richard Braun <rbraun@sceen.net> | 2014-01-03 23:54:23 +0100 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2014-01-03 23:54:23 +0100 |
commit | b53c5990ccc688e03d120c87940c7024eaca4813 (patch) | |
tree | 31f930608f9f140e6bccc8f2d5285cd3f1fb61f4 /kern/mutex.h | |
parent | 99cef9617922016bda314a6e21b499e17e1af56e (diff) |
Update calls to atomic operations
Make spin locks and mutexes encode their state on an int rather than
a long.
Diffstat (limited to 'kern/mutex.h')
-rw-r--r-- | kern/mutex.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kern/mutex.h b/kern/mutex.h index 08d3d304..1ed5234e 100644 --- a/kern/mutex.h +++ b/kern/mutex.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013 Richard Braun. + * Copyright (c) 2013-2014 Richard Braun. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -49,7 +49,7 @@ mutex_init(struct mutex *mutex) static inline int mutex_trylock(struct mutex *mutex) { - unsigned long state; + unsigned int state; state = mutex_tryacquire(mutex); @@ -62,7 +62,7 @@ mutex_trylock(struct mutex *mutex) static inline void mutex_lock(struct mutex *mutex) { - unsigned long state; + unsigned int state; state = mutex_tryacquire(mutex); @@ -77,7 +77,7 @@ mutex_lock(struct mutex *mutex) static inline void mutex_unlock(struct mutex *mutex) { - unsigned long state; + unsigned int state; state = mutex_release(mutex); |