* [gentoo-commits] gentoo-x86 commit in app-emulation/vmware-modules/files: 208-sema.patch
@ 2011-03-30 14:48 Vadim Kuznetsov (vadimk)
0 siblings, 0 replies; only message in thread
From: Vadim Kuznetsov (vadimk) @ 2011-03-30 14:48 UTC (permalink / raw
To: gentoo-commits
vadimk 11/03/30 14:48:33
Modified: 208-sema.patch
Log:
fixed sema patch
(Portage version: 2.1.9.45/cvs/Linux x86_64)
Revision Changes Path
1.2 app-emulation/vmware-modules/files/208-sema.patch
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/vmware-modules/files/208-sema.patch?rev=1.2&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/vmware-modules/files/208-sema.patch?rev=1.2&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/vmware-modules/files/208-sema.patch?r1=1.1&r2=1.2
Index: 208-sema.patch
===================================================================
RCS file: /var/cvsroot/gentoo-x86/app-emulation/vmware-modules/files/208-sema.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- 208-sema.patch 27 Mar 2011 15:40:08 -0000 1.1
+++ 208-sema.patch 30 Mar 2011 14:48:33 -0000 1.2
@@ -1,83 +1,92 @@
-diff -ru original//vmci-only/include/compat_semaphore.h patched//vmci-only/include/compat_semaphore.h
---- original//vmci-only/include/compat_semaphore.h 2010-11-11 15:37:25.000000000 -0500
-+++ patched//vmci-only/include/compat_semaphore.h 2010-11-20 10:11:56.000000000 -0500
-@@ -28,7 +28,7 @@
+diff --git a/vmci-only/include/compat_semaphore.h b/vmci-only/include/compat_semaphore.h
+index f5527b9..bc37afd 100644
+--- a/vmci-only/include/compat_semaphore.h
++++ b/vmci-only/include/compat_semaphore.h
+@@ -45,5 +45,13 @@
+ #endif
#endif
-
--#if defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)
+#if (defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)) || LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)
- /*
- * The -rt patch series changes the name of semaphore/mutex initialization
- * routines (across the entire kernel). Probably to identify locations that
-@@ -41,7 +41,7 @@
- #define DECLARE_MUTEX(_m) DEFINE_SEMAPHORE(_m)
- #endif
- #ifndef init_MUTEX
-- #define init_MUTEX(_m) semaphore_init(_m)
++ #ifndef DECLARE_MUTEX
++ #define DECLARE_MUTEX(_m) DEFINE_SEMAPHORE(_m)
++ #endif
++ #ifndef init_MUTEX
+ #define init_MUTEX(_m) sema_init(_m,1)
- #endif
- #endif
++ #endif
++#endif
-diff -ru original//vmmon-only/linux/driver.c patched//vmmon-only/linux/driver.c
---- original//vmmon-only/linux/driver.c 2010-11-11 15:37:22.000000000 -0500
-+++ patched//vmmon-only/linux/driver.c 2010-11-29 23:09:16.000000000 -0500
-@@ -145,7 +145,7 @@
- #endif
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) && \
- (defined(CONFIG_SMP) || defined(CONFIG_PREEMPT))
--# define kernel_locked_by_current() kernel_locked()
-+# define kernel_locked_by_current() (current->lock_depth >= 0)
- #else
- # define kernel_locked_by_current() 0
- #endif
-@@ -170,6 +170,7 @@
- static int LinuxDriver_Ioctl(struct inode *inode, struct file *filp,
- u_int iocmd, unsigned long ioarg);
- #if defined(HAVE_UNLOCKED_IOCTL) || defined(HAVE_COMPAT_IOCTL)
-+#define VMW_HAVE_UNLOCKED_IOCTL
- static long LinuxDriver_UnlockedIoctl(struct file *filp,
- u_int iocmd, unsigned long ioarg);
- #endif
-diff -ru original//vmnet-only/compat_semaphore.h patched//vmnet-only/compat_semaphore.h
---- original//vmnet-only/compat_semaphore.h 2010-11-11 15:37:23.000000000 -0500
-+++ patched//vmnet-only/compat_semaphore.h 2010-11-20 10:11:56.000000000 -0500
-@@ -28,7 +28,7 @@
+ #endif /* __COMPAT_SEMAPHORE_H__ */
+diff --git a/vmmon-only/include/compat_semaphore.h b/vmmon-only/include/compat_semaphore.h
+index f5527b9..bc37afd 100644
+--- a/vmmon-only/include/compat_semaphore.h
++++ b/vmmon-only/include/compat_semaphore.h
+@@ -45,5 +45,13 @@
+ #endif
#endif
-
--#if defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)
+#if (defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)) || LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)
- /*
- * The -rt patch series changes the name of semaphore/mutex initialization
- * routines (across the entire kernel). Probably to identify locations that
-@@ -41,7 +41,7 @@
- #define DECLARE_MUTEX(_m) DEFINE_SEMAPHORE(_m)
- #endif
- #ifndef init_MUTEX
-- #define init_MUTEX(_m) semaphore_init(_m)
++ #ifndef DECLARE_MUTEX
++ #define DECLARE_MUTEX(_m) DEFINE_SEMAPHORE(_m)
++ #endif
++ #ifndef init_MUTEX
+ #define init_MUTEX(_m) sema_init(_m,1)
- #endif
- #endif
++ #endif
++#endif
-diff -ru original//vsock-only/shared/compat_semaphore.h patched//vsock-only/shared/compat_semaphore.h
---- original//vsock-only/shared/compat_semaphore.h 2010-11-11 13:04:44.000000000 -0500
-+++ patched//vsock-only/shared/compat_semaphore.h 2010-11-20 10:11:56.000000000 -0500
-@@ -28,7 +28,7 @@
+ #endif /* __COMPAT_SEMAPHORE_H__ */
+diff --git a/vmnet-only/compat_semaphore.h b/vmnet-only/compat_semaphore.h
+index f5527b9..548782d 100644
+--- a/vmnet-only/compat_semaphore.h
++++ b/vmnet-only/compat_semaphore.h
+@@ -45,5 +45,14 @@
+ #endif
#endif
-
--#if defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)
+#if (defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)) || LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)
- /*
- * The -rt patch series changes the name of semaphore/mutex initialization
- * routines (across the entire kernel). Probably to identify locations that
-@@ -41,7 +41,7 @@
- #define DECLARE_MUTEX(_m) DEFINE_SEMAPHORE(_m)
- #endif
- #ifndef init_MUTEX
-- #define init_MUTEX(_m) semaphore_init(_m)
++ #ifndef DECLARE_MUTEX
++ #define DECLARE_MUTEX(_m) DEFINE_SEMAPHORE(_m)
++ #endif
++ #ifndef init_MUTEX
+ #define init_MUTEX(_m) sema_init(_m,1)
- #endif
++ #endif
++#endif
++
+
+ #endif /* __COMPAT_SEMAPHORE_H__ */
+diff --git a/vmnet-only/vnetFilter.h b/vmnet-only/vnetFilter.h
+index fe5c71f..303009f 100644
+--- a/vmnet-only/vnetFilter.h
++++ b/vmnet-only/vnetFilter.h
+@@ -203,5 +203,13 @@ struct VNet_SetLogLevel {
+ }
+ #include "vmware_pack_end.h"
+ VNet_SetLogLevel;
++#if (defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)) || LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)
++ #ifndef DECLARE_MUTEX
++ #define DECLARE_MUTEX(_m) DEFINE_SEMAPHORE(_m)
++ #endif
++ #ifndef init_MUTEX
++ #define init_MUTEX(_m) sema_init(_m,1)
++ #endif
++#endif
+
+ #endif // ifndef _VNETFILTER_H_
+diff --git a/vsock-only/linux/af_vsock.h b/vsock-only/linux/af_vsock.h
+index 3a8a0ce..d36b2ae 100644
+--- a/vsock-only/linux/af_vsock.h
++++ b/vsock-only/linux/af_vsock.h
+@@ -88,4 +88,14 @@ typedef struct VSockVmciSock {
#endif
+ } VSockVmciSock;
++#if (defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)) || LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)
++ #ifndef DECLARE_MUTEX
++ #define DECLARE_MUTEX(_m) DEFINE_SEMAPHORE(_m)
++ #endif
++ #ifndef init_MUTEX
++ #define init_MUTEX(_m) sema_init(_m,1)
++ #endif
++#endif
++
++
+ #endif /* __AF_VSOCK_H__ */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-03-30 14:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-30 14:48 [gentoo-commits] gentoo-x86 commit in app-emulation/vmware-modules/files: 208-sema.patch Vadim Kuznetsov (vadimk)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox