X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/5ba3f43ea354af8ad55bea84372a2bc834d8757c..refs/heads/master:/osfmk/arm/simple_lock.h?ds=sidebyside diff --git a/osfmk/arm/simple_lock.h b/osfmk/arm/simple_lock.h index 0fb708ede..b0dd0d928 100644 --- a/osfmk/arm/simple_lock.h +++ b/osfmk/arm/simple_lock.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007 Apple Inc. All rights reserved. + * Copyright (c) 2019 Apple Inc. All rights reserved. * * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ * @@ -28,41 +28,42 @@ /* * @OSF_COPYRIGHT@ */ -/* +/* * Mach Operating System * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University * All Rights Reserved. - * + * * Permission to use, copy, modify and distribute this software and its * documentation is hereby granted, provided that both the copyright * notice and this permission notice appear in all copies of the * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. - * + * * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * + * * Carnegie Mellon requests users of this software to return to - * + * * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU * School of Computer Science * Carnegie Mellon University * Pittsburgh PA 15213-3890 - * + * * any improvements or extensions that they make and grant Carnegie Mellon * the rights to redistribute these changes. */ -#ifdef KERNEL_PRIVATE +#ifdef KERNEL_PRIVATE + +#ifndef _ARM_SIMPLE_LOCK_TYPES_H_ +#define _ARM_SIMPLE_LOCK_TYPES_H_ -#ifndef _ARM_SIMPLE_LOCK_TYPES_H_ -#define _ARM_SIMPLE_LOCK_TYPES_H_ +#include -#ifdef KERNEL_PRIVATE +#ifdef KERNEL_PRIVATE #include #include - #include #ifdef MACH_KERNEL_PRIVATE #include @@ -72,123 +73,77 @@ #ifdef MACH_KERNEL_PRIVATE -typedef uint32_t hw_lock_bit_t; - -extern void hw_lock_bit( - hw_lock_bit_t *, - unsigned int); - -extern void hw_unlock_bit( - hw_lock_bit_t *, - unsigned int); - -extern unsigned int hw_lock_bit_try( - hw_lock_bit_t *, - unsigned int); - -extern unsigned int hw_lock_bit_to( - hw_lock_bit_t *, - unsigned int, - uint32_t); - -#define hw_lock_bit_held(l,b) (((*(l))&(1<