2002-10-19 11:20:29

by Tim Schmielau

[permalink] [raw]
Subject: [mini-patch] move _STK_LIM to <linux/resource.h>

I don't see any connection between the stack limit and scheduling.
So I think _STK_LIMIT is better defined in <linux/resource.h>
than in <linux/sched.h>.

The only place STK_LIM is used is in <asm/resource.h>, which only gets
included by <linux/resource.h>, so no change in #includes is necessary.

Tim


--- linux-2.5.44/include/linux/resource.h Sun Sep 22 06:25:00 2002
+++ linux-2.5.44-rs/include/linux/resource.h Sat Oct 19 12:59:15 2002
@@ -50,6 +50,12 @@
#define PRIO_USER 2

/*
+ * Limit the stack by to some sane default: root can always
+ * increase this limit if needed.. 8MB seems reasonable.
+ */
+#define _STK_LIM (8*1024*1024)
+
+/*
* Due to binary compatibility, the actual resource numbers
* may be different for different linux versions..
*/

--- linux-2.5.44/include/linux/sched.h Sat Oct 19 11:00:17 2002
+++ linux-2.5.44-rs/include/linux/sched.h Sat Oct 19 12:59:29 2002
@@ -431,12 +431,6 @@
#define PT_TRACESYSGOOD 0x00000004
#define PT_PTRACE_CAP 0x00000008 /* ptracer can follow suid-exec */

-/*
- * Limit the stack by to some sane default: root can always
- * increase this limit if needed.. 8MB seems reasonable.
- */
-#define _STK_LIM (8*1024*1024)
-
#if CONFIG_SMP
extern void set_cpus_allowed(task_t *p, unsigned long new_mask);
#else