]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Move SMR pointer type definition and access macros to smr_types.h.
authormarkj <markj@FreeBSD.org>
Sat, 7 Mar 2020 00:55:46 +0000 (00:55 +0000)
committermarkj <markj@FreeBSD.org>
Sat, 7 Mar 2020 00:55:46 +0000 (00:55 +0000)
commit4c39dca275a965d7709bb58d924315cbfa7422da
treeb1de2dcff2521f7375f24bb8dee3ac63312aed19
parent052e98d2a3ee8df89958a35e7e8d9ff9cdbe882c
Move SMR pointer type definition and access macros to smr_types.h.

The intent is to provide a header that can be included by other headers
without introducing too much pollution.  smr.h depends on various
headers and will likely grow over time, but is less likely to be
required by system headers.

Rename SMR_TYPE_DECLARE() to SMR_POINTER():
- One might use SMR to protect more than just pointers; it
  could be used for resizeable arrays, for example, so TYPE seems too
  generic.
- It is useful to be able to define anonymous SMR-protected pointer
  types and the _DECLARE suffix makes that look wrong.

Reviewed by: jeff, mjg, rlibby
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D23988
sys/sys/_smr.h
sys/sys/smr.h
sys/sys/smr_types.h [new file with mode: 0644]
sys/vm/vm_radix.c