]>
git.saurik.com Git - apple/objc4.git/blob - runtime/objc-lockdebug.h
071064d246984544cfb404e3dfd47955fe0d604f
2 * Copyright (c) 2015 Apple Inc. All Rights Reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
21 * @APPLE_LICENSE_HEADER_END@
24 extern void lockdebug_mutex_lock(mutex_tt
<true> *lock
);
25 extern void lockdebug_mutex_try_lock(mutex_tt
<true> *lock
);
26 extern void lockdebug_mutex_unlock(mutex_tt
<true> *lock
);
27 extern void lockdebug_mutex_assert_locked(mutex_tt
<true> *lock
);
28 extern void lockdebug_mutex_assert_unlocked(mutex_tt
<true> *lock
);
30 static inline void lockdebug_mutex_lock(mutex_tt
<false> *lock
) { }
31 static inline void lockdebug_mutex_try_lock(mutex_tt
<false> *lock
) { }
32 static inline void lockdebug_mutex_unlock(mutex_tt
<false> *lock
) { }
33 static inline void lockdebug_mutex_assert_locked(mutex_tt
<false> *lock
) { }
34 static inline void lockdebug_mutex_assert_unlocked(mutex_tt
<false> *lock
) { }
37 extern void lockdebug_monitor_enter(monitor_tt
<true> *lock
);
38 extern void lockdebug_monitor_leave(monitor_tt
<true> *lock
);
39 extern void lockdebug_monitor_wait(monitor_tt
<true> *lock
);
40 extern void lockdebug_monitor_assert_locked(monitor_tt
<true> *lock
);
41 extern void lockdebug_monitor_assert_unlocked(monitor_tt
<true> *lock
);
43 static inline void lockdebug_monitor_enter(monitor_tt
<false> *lock
) { }
44 static inline void lockdebug_monitor_leave(monitor_tt
<false> *lock
) { }
45 static inline void lockdebug_monitor_wait(monitor_tt
<false> *lock
) { }
46 static inline void lockdebug_monitor_assert_locked(monitor_tt
<false> *lock
) { }
47 static inline void lockdebug_monitor_assert_unlocked(monitor_tt
<false> *lock
) {}
51 lockdebug_recursive_mutex_lock(recursive_mutex_tt
<true> *lock
);
53 lockdebug_recursive_mutex_unlock(recursive_mutex_tt
<true> *lock
);
55 lockdebug_recursive_mutex_assert_locked(recursive_mutex_tt
<true> *lock
);
57 lockdebug_recursive_mutex_assert_unlocked(recursive_mutex_tt
<true> *lock
);
60 lockdebug_recursive_mutex_lock(recursive_mutex_tt
<false> *lock
) { }
62 lockdebug_recursive_mutex_unlock(recursive_mutex_tt
<false> *lock
) { }
64 lockdebug_recursive_mutex_assert_locked(recursive_mutex_tt
<false> *lock
) { }
66 lockdebug_recursive_mutex_assert_unlocked(recursive_mutex_tt
<false> *lock
) { }
69 extern void lockdebug_rwlock_read(rwlock_tt
<true> *lock
);
70 extern void lockdebug_rwlock_try_read_success(rwlock_tt
<true> *lock
);
71 extern void lockdebug_rwlock_unlock_read(rwlock_tt
<true> *lock
);
72 extern void lockdebug_rwlock_write(rwlock_tt
<true> *lock
);
73 extern void lockdebug_rwlock_try_write_success(rwlock_tt
<true> *lock
);
74 extern void lockdebug_rwlock_unlock_write(rwlock_tt
<true> *lock
);
75 extern void lockdebug_rwlock_assert_reading(rwlock_tt
<true> *lock
);
76 extern void lockdebug_rwlock_assert_writing(rwlock_tt
<true> *lock
);
77 extern void lockdebug_rwlock_assert_locked(rwlock_tt
<true> *lock
);
78 extern void lockdebug_rwlock_assert_unlocked(rwlock_tt
<true> *lock
);
80 static inline void lockdebug_rwlock_read(rwlock_tt
<false> *) { }
81 static inline void lockdebug_rwlock_try_read_success(rwlock_tt
<false> *) { }
82 static inline void lockdebug_rwlock_unlock_read(rwlock_tt
<false> *) { }
83 static inline void lockdebug_rwlock_write(rwlock_tt
<false> *) { }
84 static inline void lockdebug_rwlock_try_write_success(rwlock_tt
<false> *) { }
85 static inline void lockdebug_rwlock_unlock_write(rwlock_tt
<false> *) { }
86 static inline void lockdebug_rwlock_assert_reading(rwlock_tt
<false> *) { }
87 static inline void lockdebug_rwlock_assert_writing(rwlock_tt
<false> *) { }
88 static inline void lockdebug_rwlock_assert_locked(rwlock_tt
<false> *) { }
89 static inline void lockdebug_rwlock_assert_unlocked(rwlock_tt
<false> *) { }