Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Aug 2009 04:33:49 +0200
From:      Attilio Rao <attilio@freebsd.org>
To:        "Bjoern A. Zeeb" <bz@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r196226 - in head/sys: kern sys
Message-ID:  <3bbf2fe10908141933u91d0305jdc7301526adb69e2@mail.gmail.com>
In-Reply-To: <200908142146.n7ELksKZ048760@svn.freebsd.org>
References:  <200908142146.n7ELksKZ048760@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
2009/8/14 Bjoern A. Zeeb <bz@freebsd.org>:
> Author: bz
> Date: Fri Aug 14 21:46:54 2009
> New Revision: 196226
> URL: http://svn.freebsd.org/changeset/base/196226
>
> Log:
>  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)
>
> Modified:
>  head/sys/kern/kern_mutex.c
>  head/sys/kern/kern_rwlock.c
>  head/sys/kern/kern_sx.c
>  head/sys/sys/systm.h

I think you should cover the lockmgr case too.

Attilio


-- 
Peace can only be achieved by understanding - A. Einstein



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3bbf2fe10908141933u91d0305jdc7301526adb69e2>