From owner-cvs-all Mon Apr 1 13:55: 8 2002 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 2E06937B419; Mon, 1 Apr 2002 13:55:00 -0800 (PST) Received: (from jake@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g31Lt0M60308; Mon, 1 Apr 2002 13:55:00 -0800 (PST) (envelope-from jake) Message-Id: <200204012155.g31Lt0M60308@freefall.freebsd.org> From: Jake Burkholder Date: Mon, 1 Apr 2002 13:55:00 -0800 (PST) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/sys systm.h src/sys/sparc64/include param.h X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG jake 2002/04/01 13:55:00 PST Modified files: sys/sys systm.h sys/sparc64/include param.h Log: Move the CTASSERT macro from MD code to systm.h alongside KASSERT so other code can use it. This takes a single constant argument and fails to compile if it is 0 (false). The main application of this is to make assertions about structure sizes at compile time, in order to validate assumptions made in other code. Examples: CTASSERT(sizeof(struct foo) == FOO_SIZEOF); CTASSERT(sizeof(struct foo) == (1 << FOO_SHIFT)); Requested by: jhb, phk Revision Changes Path 1.12 +0 -4 src/sys/sparc64/include/param.h 1.170 +4 -0 src/sys/sys/systm.h To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message