diff --git a/drivers/include/linux/idr.h b/drivers/include/linux/idr.h index 736ed2e6f6..d19941a735 100644 --- a/drivers/include/linux/idr.h +++ b/drivers/include/linux/idr.h @@ -13,6 +13,7 @@ #define __IDR_H__ #include +#include #include //#include //#include diff --git a/drivers/include/linux/mutex.h b/drivers/include/linux/mutex.h index 7baa94dd2d..c301fe2332 100644 --- a/drivers/include/linux/mutex.h +++ b/drivers/include/linux/mutex.h @@ -56,6 +56,14 @@ struct mutex_waiter { int *task; }; + +#define __MUTEX_INITIALIZER(lockname) \ + { .count = ATOMIC_INIT(1) \ + , .wait_list = LIST_HEAD_INIT(lockname.wait_list) } + +#define DEFINE_MUTEX(mutexname) \ + struct mutex mutexname = __MUTEX_INITIALIZER(mutexname) + void __attribute__ ((fastcall)) __attribute__ ((dllimport)) mutex_init(struct mutex*)__asm__("MutexInit"); void __attribute__ ((fastcall)) __attribute__ ((dllimport))