X-Git-Url: https://git.saurik.com/apple/libc.git/blobdiff_plain/9385eb3d10ebe5eb398c52040ec3dbfba9b0cdcf..HEAD:/fbsdcompat/spinlock.h diff --git a/fbsdcompat/spinlock.h b/fbsdcompat/spinlock.h index 791d952..b3417ce 100644 --- a/fbsdcompat/spinlock.h +++ b/fbsdcompat/spinlock.h @@ -3,8 +3,6 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. - * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in @@ -62,20 +60,20 @@ #ifndef _SPINLOCK_H_ #define _SPINLOCK_H_ #ifdef __APPLE__ -#include +#include -typedef pthread_lock_t spinlock_t; +typedef os_unfair_lock spinlock_t; -#define _SPINLOCK_INITIALIZER LOCK_INITIALIZER +#define _SPINLOCK_INITIALIZER OS_UNFAIR_LOCK_INIT #define _SPINLOCK(_lck) \ do { \ - _DO_SPINLOCK_LOCK(_lck); \ + os_unfair_lock_lock(_lck); \ } while (0) #define _SPINUNLOCK(_lck) \ do { \ - _DO_SPINLOCK_UNLOCK(_lck); \ + os_unfair_lock_unlock(_lck); \ } while (0) #else /* ! __APPLE__ */