From 88b9ca48fad1ef6d1d20fc96af90847621af60b2 Mon Sep 17 00:00:00 2001 From: "Sergey Semyonov (Serge)" Date: Fri, 24 Jun 2011 12:38:40 +0000 Subject: [PATCH] DDK update - includes git-svn-id: svn://kolibrios.org@1967 a494cfbc-eb01-0410-851d-a64ba20cac60 --- drivers/include/linux/idr.h | 1 + drivers/include/linux/mutex.h | 8 ++++++++ 2 files changed, 9 insertions(+) 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))