Loading...
--- Libc/Libc-1725.40.4/fbsdcompat/spinlock.h
+++ Libc/Libc-320/fbsdcompat/spinlock.h
@@ -2,6 +2,8 @@
* Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
*
* @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
@@ -60,20 +62,20 @@
#ifndef _SPINLOCK_H_
#define _SPINLOCK_H_
#ifdef __APPLE__
-#include <os/lock.h>
+#include <pthread_spinlock.h>
-typedef os_unfair_lock spinlock_t;
+typedef pthread_lock_t spinlock_t;
-#define _SPINLOCK_INITIALIZER OS_UNFAIR_LOCK_INIT
+#define _SPINLOCK_INITIALIZER LOCK_INITIALIZER
#define _SPINLOCK(_lck) \
do { \
- os_unfair_lock_lock(_lck); \
+ _DO_SPINLOCK_LOCK(_lck); \
} while (0)
#define _SPINUNLOCK(_lck) \
do { \
- os_unfair_lock_unlock(_lck); \
+ _DO_SPINLOCK_UNLOCK(_lck); \
} while (0)
#else /* ! __APPLE__ */