xref: /freebsd/sys/contrib/openzfs/module/os/linux/spl/spl-atomic.c (revision 61145dc2b94f12f6a47344fb9aac702321880e43)
1*61145dc2SMartin Matuska // SPDX-License-Identifier: GPL-2.0-or-later
2eda14cbcSMatt Macy /*
3eda14cbcSMatt Macy  *  Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC.
4eda14cbcSMatt Macy  *  Copyright (C) 2007 The Regents of the University of California.
5eda14cbcSMatt Macy  *  Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
6eda14cbcSMatt Macy  *  Written by Brian Behlendorf <behlendorf1@llnl.gov>.
7eda14cbcSMatt Macy  *  UCRL-CODE-235197
8eda14cbcSMatt Macy  *
9eda14cbcSMatt Macy  *  This file is part of the SPL, Solaris Porting Layer.
10eda14cbcSMatt Macy  *
11eda14cbcSMatt Macy  *  The SPL is free software; you can redistribute it and/or modify it
12eda14cbcSMatt Macy  *  under the terms of the GNU General Public License as published by the
13eda14cbcSMatt Macy  *  Free Software Foundation; either version 2 of the License, or (at your
14eda14cbcSMatt Macy  *  option) any later version.
15eda14cbcSMatt Macy  *
16eda14cbcSMatt Macy  *  The SPL is distributed in the hope that it will be useful, but WITHOUT
17eda14cbcSMatt Macy  *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18eda14cbcSMatt Macy  *  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
19eda14cbcSMatt Macy  *  for more details.
20eda14cbcSMatt Macy  *
21eda14cbcSMatt Macy  *  You should have received a copy of the GNU General Public License along
22eda14cbcSMatt Macy  *  with the SPL.  If not, see <http://www.gnu.org/licenses/>.
23eda14cbcSMatt Macy  *
24eda14cbcSMatt Macy  *  Solaris Porting Layer (SPL) Atomic Implementation.
25eda14cbcSMatt Macy  */
26eda14cbcSMatt Macy 
27eda14cbcSMatt Macy #include <sys/atomic.h>
28eda14cbcSMatt Macy 
29eda14cbcSMatt Macy #ifdef ATOMIC_SPINLOCK
30eda14cbcSMatt Macy /* Global atomic lock declarations */
31eda14cbcSMatt Macy DEFINE_SPINLOCK(atomic32_lock);
32eda14cbcSMatt Macy DEFINE_SPINLOCK(atomic64_lock);
33eda14cbcSMatt Macy 
34eda14cbcSMatt Macy EXPORT_SYMBOL(atomic32_lock);
35eda14cbcSMatt Macy EXPORT_SYMBOL(atomic64_lock);
36eda14cbcSMatt Macy #endif /* ATOMIC_SPINLOCK */
37