[PATCH]include/linux/threads.h : Removes extra checking CONFIG_BASE_SMALL
From: Rakib Mullick
Date: Wed Jun 18 2008 - 06:18:15 EST
In existing code for defining PID_MAX_DEFAULT and PID_MAX_LIMIT,a check for
CONFIG_BASE_SMALL has been made twice. This patch reduces an extra checking.
Signed-off-by: Md.Rakib H. Mullick ( rakib.mullick@xxxxxxxxx)
--- linux-2.6.25/include/linux/threads.h.orig 2008-06-16
11:46:42.000000000 +0600
+++ linux-2.6.25/include/linux/threads.h 2008-06-17 19:41:19.462424632 +0600
@@ -24,13 +24,17 @@
/*
* This controls the default maximum pid allocated to a process
*/
-#define PID_MAX_DEFAULT (CONFIG_BASE_SMALL ? 0x1000 : 0x8000)
-
/*
* A maximum of 4 million PIDs should be enough for a while.
* [NOTE: PID/TIDs are limited to 2^29 ~= 500+ million, see futex.h.]
*/
-#define PID_MAX_LIMIT (CONFIG_BASE_SMALL ? PAGE_SIZE * 8 : \
- (sizeof(long) > 4 ? 4 * 1024 * 1024 : PID_MAX_DEFAULT))
+#if (CONFIG_BASE_SMALL)
+#define PID_MAX_DEFAULT 0x1000
+#define PID_MAX_LIMIT (PAGE_SIZE * 8)
+#else
+#define PID_MAX_DEFAULT 0x8000
+#define PID_MAX_LIMIT (sizeof(long) > 4 ? 4 * 1024 * 1024 : PID_MAX_DEFAULT)
+#endif
+
#endif
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/