]> git.saurik.com Git - apple/xnu.git/blame - bsd/sys/lockstat.h
xnu-6153.81.5.tar.gz
[apple/xnu.git] / bsd / sys / lockstat.h
CommitLineData
2d21ac55
A
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
8 *
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
13 *
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 *
20 * CDDL HEADER END
21 */
22/*
23 * Copyright 1997-2003 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
25 */
26
27#ifndef _SYS_LOCKSTAT_H
0a7de745 28#define _SYS_LOCKSTAT_H
2d21ac55 29
0a7de745 30#ifdef __cplusplus
2d21ac55
A
31extern "C" {
32#endif
33
2d21ac55
A
34/*
35 * Name the various locking functions...
36 */
0a7de745
A
37#define LS_LCK_MTX_LOCK "lck_mtx_lock"
38#define LS_LCK_MTX_SPIN_LOCK "lck_mtx_spin_lock"
39#define LS_LCK_MTX_UNLOCK "lck_mtx_unlock"
40#define LS_LCK_MTX_TRY_LOCK "lck_mtx_try_lock"
41#define LS_LCK_MTX_TRY_SPIN_LOCK "lck_mtx_try_spin_lock"
42#define LS_LCK_MTX_EXT_LOCK "lck_mtx_ext_lock"
43#define LS_LCK_MTX_EXT_UNLOCK "lck_mtx_ext_unlock"
44#define LS_LCK_MTX_EXT_TRY_LOCK "lck_mtx_ext_try_lock"
45#define LS_LCK_MTX_LOCK_SPIN_LOCK "lck_mtx_lock_spin"
46
47#define LS_LCK_SPIN_LOCK "lck_spin_lock"
48#define LS_LCK_SPIN_TRY_LOCK "lck_spin_try_lock"
49#define LS_LCK_SPIN_UNLOCK "lck_spin_unlock"
50#define LS_LCK_RW_LOCK_SHARED "lck_rw_lock_shared"
51#define LS_LCK_RW_LOCK_EXCL "lck_rw_lock_exclusive"
52#define LS_LCK_RW_DONE "lck_rw_done"
53#define LS_LCK_RW_TRY_LOCK_EXCL "lck_rw_try_lock_exclusive"
54#define LS_LCK_RW_TRY_LOCK_SHARED "lck_rw_try_lock_shared"
55#define LS_LCK_RW_LOCK_SHARED_TO_EXCL "lck_rw_shared_to_exclusive"
56#define LS_LCK_RW_LOCK_EXCL_TO_SHARED "lck_rw_exclusive_to_shared"
57
58#define LS_ACQUIRE "acquire"
59#define LS_RELEASE "release"
60#define LS_SPIN "spin"
61#define LS_BLOCK "block"
62#define LS_UPGRADE "upgrade"
63#define LS_DOWNGRADE "downgrade"
64
65#define LS_TYPE_ADAPTIVE "adaptive"
66#define LS_TYPE_SPIN "spin"
67#define LS_TYPE_ILK "interlock" /* OS X only */
68#define LS_TYPE_THREAD "thread" /* Solaris only */
69#define LS_TYPE_RW "rw"
70#define LS_TYPE_RWUPGRADE "rwupgrade" /* OS X only */
71
72#define LSA_ACQUIRE (LS_TYPE_ADAPTIVE "-" LS_ACQUIRE)
73#define LSA_RELEASE (LS_TYPE_ADAPTIVE "-" LS_RELEASE)
74#define LSA_SPIN (LS_TYPE_ADAPTIVE "-" LS_SPIN)
75#define LSA_BLOCK (LS_TYPE_ADAPTIVE "-" LS_BLOCK)
76#define LSA_ILK_SPIN (LS_TYPE_ILK "-" LS_SPIN)
77#define LSS_ACQUIRE (LS_TYPE_SPIN "-" LS_ACQUIRE)
78#define LSS_RELEASE (LS_TYPE_SPIN "-" LS_RELEASE)
79#define LSS_SPIN (LS_TYPE_SPIN "-" LS_SPIN)
80#define LSR_ACQUIRE (LS_TYPE_RW "-" LS_ACQUIRE)
81#define LSR_RELEASE (LS_TYPE_RW "-" LS_RELEASE)
82#define LSR_BLOCK (LS_TYPE_RW "-" LS_BLOCK)
83#define LSR_SPIN (LS_TYPE_RW "-" LS_SPIN)
84#define LSR_UPGRADE (LS_TYPE_RW "-" LS_UPGRADE)
85#define LSR_UPGRADE_BLOCK (LS_TYPE_RWUPGRADE "-" LS_BLOCK)
86#define LSR_DOWNGRADE (LS_TYPE_RW "-" LS_DOWNGRADE)
87#define LST_SPIN (LS_TYPE_THREAD "-" LS_SPIN)
88
89#ifdef __cplusplus
2d21ac55
A
90}
91#endif
92
0a7de745 93#endif /* _SYS_LOCKSTAT_H */