1*a5511fa9Sguenther /* $OpenBSD: spinlock.h,v 1.1 2017/09/05 02:40:54 guenther Exp $ */ 2*a5511fa9Sguenther /* 3*a5511fa9Sguenther * Copyright (c) 2017 Philip Guenther <guenther@openbsd.org> 4*a5511fa9Sguenther * 5*a5511fa9Sguenther * Permission to use, copy, modify, and distribute this software for any 6*a5511fa9Sguenther * purpose with or without fee is hereby granted, provided that the above 7*a5511fa9Sguenther * copyright notice and this permission notice appear in all copies. 8*a5511fa9Sguenther * 9*a5511fa9Sguenther * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10*a5511fa9Sguenther * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11*a5511fa9Sguenther * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12*a5511fa9Sguenther * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13*a5511fa9Sguenther * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14*a5511fa9Sguenther * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15*a5511fa9Sguenther * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16*a5511fa9Sguenther */ 17*a5511fa9Sguenther 18*a5511fa9Sguenther #ifndef _LIBC_MACHINE_SPINLOCK_H_ 19*a5511fa9Sguenther #define _LIBC_MACHINE_SPINLOCK_H_ 20*a5511fa9Sguenther 21*a5511fa9Sguenther #include_next <machine/spinlock.h> 22*a5511fa9Sguenther 23*a5511fa9Sguenther __BEGIN_HIDDEN_DECLS 24*a5511fa9Sguenther int _atomic_lock(volatile _atomic_lock_t *); 25*a5511fa9Sguenther __END_HIDDEN_DECLS 26*a5511fa9Sguenther 27*a5511fa9Sguenther #endif /* !_LIBC_MACHINE_SPINLOCK_H_ */ 28