Fix to l4_mutex_control for the unexpected sleeping with mutex held

when preemption occurs after call to wait_on_prepare
This commit is contained in:
Bahadir Balban
2009-06-10 15:41:30 +03:00
parent 6b3ddadcf5
commit 7ef479733f
3 changed files with 36 additions and 6 deletions

View File

@@ -29,6 +29,7 @@ static inline void mutex_init(struct mutex *mutex)
int mutex_trylock(struct mutex *mutex);
int mutex_lock(struct mutex *mutex);
void mutex_unlock(struct mutex *mutex);
void mutex_unlock_async(struct mutex *mutex);
/* NOTE: Since spinlocks guard mutex acquiring & sleeping, no locks needed */
static inline int mutex_inc(unsigned int *cnt)