From: Robert Nelson Date: Mon, 1 Nov 2010 15:23:52 +0000 (-0500) Subject: OMAP3 SGX TI 4.00.00.01 2.6.37-rc1 use semaphore over mutex X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6f46e9fece002a679a0946f93de9a9f1caaee38c;p=sgx.git OMAP3 SGX TI 4.00.00.01 2.6.37-rc1 use semaphore over mutex Signed-off-by: Robert Nelson Changes by Koen: Protect it with #if LINUX_VERSION_CODE => KERNEL_VERSION(2,6,36) --- diff --git a/services4/srvkm/common/resman.c b/services4/srvkm/common/resman.c index d713c3c..cf3c207 100644 --- a/services4/srvkm/common/resman.c +++ b/services4/srvkm/common/resman.c @@ -46,7 +46,11 @@ #include #endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) +static DEFINE_SEMAPHORE(lock); +#else static DECLARE_MUTEX(lock); +#endif #define ACQUIRE_SYNC_OBJ do { \ if (in_interrupt()) { \