From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 07:35:10 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E935C106564A; Sun, 25 Jan 2009 07:35:10 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BD8818FC14; Sun, 25 Jan 2009 07:35:10 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0P7ZA1f009929; Sun, 25 Jan 2009 07:35:10 GMT (envelope-from jeff@svn.freebsd.org) Received: (from jeff@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0P7ZAgC009926; Sun, 25 Jan 2009 07:35:10 GMT (envelope-from jeff@svn.freebsd.org) Message-Id: <200901250735.n0P7ZAgC009926@svn.freebsd.org> From: Jeff Roberson Date: Sun, 25 Jan 2009 07:35:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187679 - in head/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2009 07:35:11 -0000 Author: jeff Date: Sun Jan 25 07:35:10 2009 New Revision: 187679 URL: http://svn.freebsd.org/changeset/base/187679 Log: - Use __XSTRING where I want the define to be expanded. This resulted in sizeof("MAXCPU") being used to calculate a string length rather than something more reasonable such as sizeof("32"). This shouldn't have caused any ill effect until we run on machines with 1000000 or more cpus. Modified: head/sys/kern/sched_4bsd.c head/sys/kern/sched_ule.c head/sys/sys/pcpu.h Modified: head/sys/kern/sched_4bsd.c ============================================================================== --- head/sys/kern/sched_4bsd.c Sun Jan 25 07:31:51 2009 (r187678) +++ head/sys/kern/sched_4bsd.c Sun Jan 25 07:35:10 2009 (r187679) @@ -82,7 +82,7 @@ dtrace_vtime_switch_func_t dtrace_vtime_ #endif #define NICE_WEIGHT 1 /* Priorities per nice level. */ -#define TS_NAME_LEN (MAXCOMLEN + sizeof(" td ") + sizeof(__STRING(UINT_MAX))) +#define TS_NAME_LEN (MAXCOMLEN + sizeof(" td ") + sizeof(__XSTRING(UINT_MAX))) /* * The schedulable entity that runs a context. Modified: head/sys/kern/sched_ule.c ============================================================================== --- head/sys/kern/sched_ule.c Sun Jan 25 07:31:51 2009 (r187678) +++ head/sys/kern/sched_ule.c Sun Jan 25 07:35:10 2009 (r187679) @@ -86,8 +86,8 @@ dtrace_vtime_switch_func_t dtrace_vtime_ #define KTR_ULE 0 -#define TS_NAME_LEN (MAXCOMLEN + sizeof(" td ") + sizeof(__STRING(UINT_MAX))) -#define TDQ_NAME_LEN (sizeof("sched lock ") + sizeof(__STRING(MAXCPU))) +#define TS_NAME_LEN (MAXCOMLEN + sizeof(" td ") + sizeof(__XSTRING(UINT_MAX))) +#define TDQ_NAME_LEN (sizeof("sched lock ") + sizeof(__XSTRING(MAXCPU))) #define TDQ_LOADNAME_LEN (PCPU_NAME_LEN + sizeof(" load")) /* Modified: head/sys/sys/pcpu.h ============================================================================== --- head/sys/sys/pcpu.h Sun Jan 25 07:31:51 2009 (r187678) +++ head/sys/sys/pcpu.h Sun Jan 25 07:35:10 2009 (r187679) @@ -54,7 +54,7 @@ struct rm_queue { struct rm_queue* volatile rmq_prev; }; -#define PCPU_NAME_LEN (sizeof("CPU ") + sizeof(__STRING(MAXCPU) + 1)) +#define PCPU_NAME_LEN (sizeof("CPU ") + sizeof(__XSTRING(MAXCPU) + 1)) /*