summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Robbins <drobbins@gentoo.org>2001-11-16 23:10:14 +0000
committerDaniel Robbins <drobbins@gentoo.org>2001-11-16 23:10:14 +0000
commitc4232c72f82fe652765a898f1190f6201cfaccf8 (patch)
tree48506226295a19d7598989a4b81ec3b3980fe8ff /sys-kernel
parentifixo (diff)
downloadhistorical-c4232c72f82fe652765a898f1190f6201cfaccf8.tar.gz
historical-c4232c72f82fe652765a898f1190f6201cfaccf8.tar.bz2
historical-c4232c72f82fe652765a898f1190f6201cfaccf8.zip
tiny duplicate define fix
Diffstat (limited to 'sys-kernel')
-rw-r--r--sys-kernel/linux-sources/files/2.4.15pre1aa1-fixes/low-latency.h101
-rw-r--r--sys-kernel/linux-sources/linux-sources-2.4.15_pre1.ebuild5
2 files changed, 104 insertions, 2 deletions
diff --git a/sys-kernel/linux-sources/files/2.4.15pre1aa1-fixes/low-latency.h b/sys-kernel/linux-sources/files/2.4.15pre1aa1-fixes/low-latency.h
new file mode 100644
index 000000000000..64baf209e7ce
--- /dev/null
+++ b/sys-kernel/linux-sources/files/2.4.15pre1aa1-fixes/low-latency.h
@@ -0,0 +1,101 @@
+/*
+ * include/linux/low-latency.h
+ *
+ * Andrew Morton <andrewm@uow.edu.au>
+ */
+
+#ifndef LOW_LATENCY_H_INCLUDED
+#define LOW_LATENCY_H_INCLUDED
+
+#if defined(CONFIG_LOLAT)
+#define LOWLATENCY_NEEDED 1
+#else
+#define LOWLATENCY_NEEDED 0
+#endif
+
+#if LOWLATENCY_NEEDED
+
+#include <linux/cache.h> /* For ____cacheline_aligned */
+
+#ifdef CONFIG_LOLAT_SYSCTL
+extern struct low_latency_enable_struct {
+ int yep;
+} ____cacheline_aligned __enable_lowlatency;
+#define enable_lowlatency __enable_lowlatency.yep
+
+#else
+#define enable_lowlatency 1
+#endif
+
+/*
+ * Set this non-zero to generate low-latency instrumentation
+ */
+#define LOWLATENCY_DEBUG 0
+
+/*
+ * Set this non-zero for robustness testing
+ */
+#define LOWLATENCY_ALWAYS_SCHEDULE 0
+
+#if LOWLATENCY_DEBUG
+
+#if LOWLATENCY_ALWAYS_SCHEDULE
+#define conditional_schedule_needed() ((enable_lowlatency == 2) || (enable_lowlatency && current->need_resched))
+#else
+#define conditional_schedule_needed() (enable_lowlatency && current->need_resched)
+#endif
+
+struct lolat_stats_t {
+ unsigned long count;
+ int visited;
+ const char *file;
+ int line;
+ struct lolat_stats_t *next;
+};
+
+void set_running_and_schedule(struct lolat_stats_t *stats);
+
+#define unconditional_schedule() \
+ do { \
+ static struct lolat_stats_t stats = { \
+ file: __FILE__, \
+ line: __LINE__, \
+ }; \
+ set_running_and_schedule(&stats); \
+ } while (0)
+
+extern void show_lolat_stats(void);
+
+#else /* LOWLATENCY_DEBUG */
+
+#if LOWLATENCY_ALWAYS_SCHEDULE
+#define conditional_schedule_needed() 1
+#else
+#define conditional_schedule_needed() (current->need_resched)
+#endif
+
+void set_running_and_schedule(void);
+#define unconditional_schedule() set_running_and_schedule()
+
+#endif /* LOWLATENCY_DEBUG */
+
+#define DEFINE_RESCHED_COUNT int resched_count = 0
+#define TEST_RESCHED_COUNT(n) (enable_lowlatency && (++resched_count > (n)))
+#define RESET_RESCHED_COUNT() resched_count = 0
+extern int ll_copy_to_user(void *to_user, const void *from, unsigned long len);
+
+#else /* LOWLATENCY_NEEDED */
+
+#define conditional_schedule_needed() 0
+#define conditional_schedule()
+#define unconditional_schedule()
+
+#define DEFINE_RESCHED_COUNT
+#define TEST_RESCHED_COUNT(n) 0
+#define RESET_RESCHED_COUNT()
+#define ll_copy_to_user(to_user, from, len) copy_to_user((to_user), (from), (len))
+
+#endif /* LOWLATENCY_NEEDED */
+
+#endif /* LOW_LATENCY_H_INCLUDED */
+
diff --git a/sys-kernel/linux-sources/linux-sources-2.4.15_pre1.ebuild b/sys-kernel/linux-sources/linux-sources-2.4.15_pre1.ebuild
index 681a8cc3f6bf..b612c9c7139e 100644
--- a/sys-kernel/linux-sources/linux-sources-2.4.15_pre1.ebuild
+++ b/sys-kernel/linux-sources/linux-sources-2.4.15_pre1.ebuild
@@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License, v2 or later
# Maintainer: System Team <system@gentoo.org>
# Author: Daniel Robbins <drobbins@gentoo.org>
-# $Header: /var/cvsroot/gentoo-x86/sys-kernel/linux-sources/linux-sources-2.4.15_pre1.ebuild,v 1.1 2001/11/16 21:59:06 drobbins Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/linux-sources/linux-sources-2.4.15_pre1.ebuild,v 1.2 2001/11/16 23:10:14 drobbins Exp $
#OKV=original kernel version, KV=patched kernel version. They can be the same.
@@ -127,7 +127,8 @@ src_unpack() {
cp filemap.c ${S}/mm || die
cp sched.h ${S}/include/linux || die
cp fs.h ${S}/include/linux || die
-
+ cp low-latency.h ${S}/include/linux || die
+
echo "Preparing for compilation..."
cd ${S}