diff -purN v2.6.12-rc2/include/linux/mutex.h v2.6.12-rc2-00_mutex/include/linux/mutex.h --- v2.6.12-rc2/include/linux/mutex.h 1969-12-31 19:00:00.000000000 -0500 +++ v2.6.12-rc2-00_mutex/include/linux/mutex.h 2005-04-07 15:38:22.000000000 -0400 @@ -0,0 +1,40 @@ +#ifndef _LINUX_MUTEX_H +#define _LINUX_MUTEX_H + +#include + +struct mutex { + struct semaphore sem; +}; + +static inline void mutex_lock(struct mutex *mut) +{ + down(&mut->sem); +} + +static inline int mutex_lock_interruptible(struct mutex *mut) +{ + return down_interruptible(&mut->sem); +} + +static inline void mutex_unlock(struct mutex *mut) +{ + up(&mut->sem); +} + +static inline int mutex_trylock(struct mutex *mut) +{ + return down_trylock(&mut->sem); +} + +static inline void mutex_init(struct mutex *mut) +{ + sema_init(&mut->sem, 1); +} + +static inline void mutex_init_LOCKED(struct mutex *mut) +{ + sema_init(&mut->sem, 0); +} + +#endif /* _LINUX_MUTEX_H */