Date: Fri, 14 Aug 2009 21:50:47 +0000 (UTC) From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: cvs-src-old@freebsd.org Subject: cvs commit: src/sys/kern kern_mutex.c kern_rwlock.c kern_sx.c src/sys/sys systm.h Message-ID: <200908142151.n7ELp3pK046674@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
bz 2009-08-14 21:50:47 UTC FreeBSD src repository Modified files: (Branch: RELENG_8) sys/kern kern_mutex.c kern_rwlock.c kern_sx.c sys/sys systm.h Log: SVN rev 196227 on 2009-08-14 21:50:47Z by bz MFC r196226: Add a new macro to test that a variable could be loaded atomically. Check that the given variable is at most uintptr_t in size and that it is aligned. Note: ASSERT_ATOMIC_LOAD() uses ALIGN() to check for adequate alignment -- however, the function of ALIGN() is to guarantee alignment, and therefore may lead to stronger alignment enforcement than necessary for types that are smaller than sizeof(uintptr_t). Add checks to mtx, rw and sx locks init functions to detect possible breakage. This was used during debugging of the problem fixed with r196118 where a pointer was on an un-aligned address in the dpcpu area. In collaboration with: rwatson Reviewed by: rwatson Approved by: re (kib) Revision Changes Path 1.213.2.2 +2 -0 src/sys/kern/kern_mutex.c 1.48.2.2 +2 -0 src/sys/kern/kern_rwlock.c 1.67.2.2 +2 -0 src/sys/kern/kern_sx.c 1.276.2.2 +4 -0 src/sys/sys/systm.h
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200908142151.n7ELp3pK046674>