/*
- * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
#ifndef _SYS_LOCK_H_
#define _SYS_LOCK_H_
-#ifdef KERNEL
+#include <sys/appleapiopts.h>
+
+#ifdef KERNEL
+#ifdef __APPLE_API_UNSTABLE
#include <kern/simple_lock.h>
#include <kern/simple_lock_types.h>
#endif
#define simple_lock_init(l) usimple_lock_init((l),0)
+#if defined(simple_lock)
+#undef simple_lock
+#endif
+#define simple_lock(l) ((void) 1)
+
+#if defined(simple_unlock)
+#undef simple_unlock
+#endif
+#define simple_unlock(l) ((void) 1)
+
+#if defined(simple_lock_try)
+#undef simple_lock_try
+#endif
+#define simple_lock_try(l) 1
+
+#if defined(thread_sleep_simple_lock)
+#undef thread_sleep_simple_lock
+#endif
+#define thread_sleep_simple_lock(l, e, i) thread_sleep_funnel((e), (i))
+
+#endif /* __APPLE_API_UNSTABLE */
#else /* KERNEL */
#ifndef _MACHINE_SIMPLE_LOCK_DATA_
#endif /* _MACHINE_SIMPLE_LOCK_DATA_ */
#endif /* KERNEL */
+
+#ifdef __APPLE_API_UNSTABLE
/*
* The general lock structure. Provides for multiple shared locks,
* upgrading from shared to exclusive, and sleeping until the lock
simple_lock_t, struct proc *p));
int lockstatus __P((struct lock__bsd__ *));
+#endif /* __APPLE_API_UNSTABLE */
+
#endif /* _SYS_LOCK_H_ */