From: "Rakib Mullick" <rakib.mullick@gmail.com>
To: mingo@redhat.com, arjan@infradead.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH]include/linux/threads.h : Removes extra checking CONFIG_BASE_SMALL
Date: Wed, 18 Jun 2008 16:17:56 +0600 [thread overview]
Message-ID: <b9df5fa10806180317k35e9861dr37bc346062924299@mail.gmail.com> (raw)
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@gmail.com)
--- 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
next reply other threads:[~2008-06-18 10:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-18 10:17 Rakib Mullick [this message]
2008-06-18 11:40 ` Ingo Molnar
2008-06-18 10:57 Rakib Mullick
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b9df5fa10806180317k35e9861dr37bc346062924299@mail.gmail.com \
--to=rakib.mullick@gmail.com \
--cc=arjan@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®