Whamcloud - gitweb
get libcfs/ and portals/ building
authorzab <zab>
Mon, 19 May 2003 23:05:21 +0000 (23:05 +0000)
committerzab <zab>
Mon, 19 May 2003 23:05:21 +0000 (23:05 +0000)
- add portals kernel_compat header
- get THREAD_SIZE from the kernel
-  minor typos in makefiles, don't ask to build non-existant files
- continue to fix up the const propogation

lnet/include/linux/kernel_compat.h [new file with mode: 0644]
lustre/portals/include/linux/kernel_compat.h [new file with mode: 0644]

diff --git a/lnet/include/linux/kernel_compat.h b/lnet/include/linux/kernel_compat.h
new file mode 100644 (file)
index 0000000..6893c40
--- /dev/null
@@ -0,0 +1,33 @@
+/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
+ * vim:expandtab:shiftwidth=8:tabstop=8:
+ */
+
+#ifndef _KERNEL_COMPAT_H
+#define _KERNEL_COMPAT_H
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
+
+#define SIGNAL_MASK_LOCK(task, flags)         \
+        spin_lock_irqsave( &task->sighand->siglock, flags)
+#define SIGNAL_MASK_UNLOCK(task, flags)       \
+        spin_unlock_irqrestore(&task->sighand->siglock, flags)
+#define USERMODEHELPER(path, argv, envp)       \
+        call_usermodehelper(path, argv, envp, 0)
+#define RECALC_SIGPENDING       recalc_sigpending
+#define CURRENT_SECONDS         get_seconds()
+
+#else 
+        /* 2.4.. */
+
+#define SIGNAL_MASK_LOCK(task, flags)         \
+        spin_lock_irqsave(&task->sigmask_lock, flags)
+#define SIGNAL_MASK_UNLOCK(task, flags)       \
+        spin_unlock_irqrestore(&task->sigmask_lock, flags)
+#define USERMODEHELPER(path, argv, envp)       \
+        call_usermodehelper(path, argv, envp)
+#define RECALC_SIGPENDING         recalc_sigpending(current)
+#define CURRENT_SECONDS         CURRENT_TIME
+
+#endif
+
+#endif /* _KERNEL_COMPAT_H */
diff --git a/lustre/portals/include/linux/kernel_compat.h b/lustre/portals/include/linux/kernel_compat.h
new file mode 100644 (file)
index 0000000..6893c40
--- /dev/null
@@ -0,0 +1,33 @@
+/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
+ * vim:expandtab:shiftwidth=8:tabstop=8:
+ */
+
+#ifndef _KERNEL_COMPAT_H
+#define _KERNEL_COMPAT_H
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
+
+#define SIGNAL_MASK_LOCK(task, flags)         \
+        spin_lock_irqsave( &task->sighand->siglock, flags)
+#define SIGNAL_MASK_UNLOCK(task, flags)       \
+        spin_unlock_irqrestore(&task->sighand->siglock, flags)
+#define USERMODEHELPER(path, argv, envp)       \
+        call_usermodehelper(path, argv, envp, 0)
+#define RECALC_SIGPENDING       recalc_sigpending
+#define CURRENT_SECONDS         get_seconds()
+
+#else 
+        /* 2.4.. */
+
+#define SIGNAL_MASK_LOCK(task, flags)         \
+        spin_lock_irqsave(&task->sigmask_lock, flags)
+#define SIGNAL_MASK_UNLOCK(task, flags)       \
+        spin_unlock_irqrestore(&task->sigmask_lock, flags)
+#define USERMODEHELPER(path, argv, envp)       \
+        call_usermodehelper(path, argv, envp)
+#define RECALC_SIGPENDING         recalc_sigpending(current)
+#define CURRENT_SECONDS         CURRENT_TIME
+
+#endif
+
+#endif /* _KERNEL_COMPAT_H */