14e7f640dSJohn Baldwin /*- 24d846d26SWarner Losh * SPDX-License-Identifier: BSD-2-Clause 3c4e20cadSPedro F. Giffuni * 44e7f640dSJohn Baldwin * Copyright (c) 2007 Attilio Rao <attilio@freebsd.org> 54e7f640dSJohn Baldwin * All rights reserved. 64e7f640dSJohn Baldwin * 74e7f640dSJohn Baldwin * Redistribution and use in source and binary forms, with or without 84e7f640dSJohn Baldwin * modification, are permitted provided that the following conditions 94e7f640dSJohn Baldwin * are met: 104e7f640dSJohn Baldwin * 1. Redistributions of source code must retain the above copyright 114e7f640dSJohn Baldwin * notice(s), this list of conditions and the following disclaimer as 124e7f640dSJohn Baldwin * the first lines of this file unmodified other than the possible 134e7f640dSJohn Baldwin * addition of one or more copyright notices. 144e7f640dSJohn Baldwin * 2. Redistributions in binary form must reproduce the above copyright 154e7f640dSJohn Baldwin * notice(s), this list of conditions and the following disclaimer in the 164e7f640dSJohn Baldwin * documentation and/or other materials provided with the distribution. 174e7f640dSJohn Baldwin * 184e7f640dSJohn Baldwin * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY 194e7f640dSJohn Baldwin * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 204e7f640dSJohn Baldwin * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 214e7f640dSJohn Baldwin * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY 224e7f640dSJohn Baldwin * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 234e7f640dSJohn Baldwin * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 244e7f640dSJohn Baldwin * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 254e7f640dSJohn Baldwin * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 264e7f640dSJohn Baldwin * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 274e7f640dSJohn Baldwin * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 284e7f640dSJohn Baldwin * DAMAGE. 294e7f640dSJohn Baldwin */ 304e7f640dSJohn Baldwin 314e7f640dSJohn Baldwin #ifndef _SYS__SX_H_ 324e7f640dSJohn Baldwin #define _SYS__SX_H_ 334e7f640dSJohn Baldwin 34*d14c38ceSMark Johnston #include <sys/_types.h> 35*d14c38ceSMark Johnston #include <sys/_lock.h> 36*d14c38ceSMark Johnston 374e7f640dSJohn Baldwin /* 384e7f640dSJohn Baldwin * Shared/exclusive lock main structure definition. 394e7f640dSJohn Baldwin */ 404e7f640dSJohn Baldwin struct sx { 414e7f640dSJohn Baldwin struct lock_object lock_object; 42*d14c38ceSMark Johnston volatile __uintptr_t sx_lock; 434e7f640dSJohn Baldwin }; 444e7f640dSJohn Baldwin 454e7f640dSJohn Baldwin #endif /* !_SYS__SX_H_ */ 46