Date: Mon, 1 Apr 2002 13:55:00 -0800 (PST) From: Jake Burkholder <jake@FreeBSD.org> To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/sys systm.h src/sys/sparc64/include param.h Message-ID: <200204012155.g31Lt0M60308@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200204012155.g31Lt0M60308>