From d982267756865bce8bb80363fa117f2ef75881a1 Mon Sep 17 00:00:00 2001 From: zab Date: Mon, 19 May 2003 23:05:21 +0000 Subject: [PATCH] get libcfs/ and portals/ building - 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 | 33 ++++++++++++++++++++++++++++ lustre/portals/include/linux/kernel_compat.h | 33 ++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 lnet/include/linux/kernel_compat.h create mode 100644 lustre/portals/include/linux/kernel_compat.h diff --git a/lnet/include/linux/kernel_compat.h b/lnet/include/linux/kernel_compat.h new file mode 100644 index 0000000..6893c40 --- /dev/null +++ b/lnet/include/linux/kernel_compat.h @@ -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 index 0000000..6893c40 --- /dev/null +++ b/lustre/portals/include/linux/kernel_compat.h @@ -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 */ -- 1.8.3.1