Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Aug 2009 21:46:54 +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:  <200908142147.n7ELlAA4046345@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
bz          2009-08-14 21:46:54 UTC

  FreeBSD src repository

  Modified files:
    sys/kern             kern_mutex.c kern_rwlock.c kern_sx.c 
    sys/sys              systm.h 
  Log:
  SVN rev 196226 on 2009-08-14 21:46:54Z by bz
  
  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.214     +2 -0      src/sys/kern/kern_mutex.c
  1.49      +2 -0      src/sys/kern/kern_rwlock.c
  1.68      +2 -0      src/sys/kern/kern_sx.c
  1.277     +4 -0      src/sys/sys/systm.h



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