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 28 #define _SYS_LOCKSTAT_H 29 30 #ifdef __cplusplus 31 extern "C" { 32 #endif 33 34 /* 35 * Name the various locking functions... 36 */ 37 #define LS_LCK_MTX_LOCK_SPIN "lck_mtx_lock_spin" 38 #define LS_LCK_MTX_LOCK "lck_mtx_lock" 39 #define LS_LCK_MTX_TRY_LOCK_SPIN "lck_mtx_try_lock_spin" 40 #define LS_LCK_MTX_TRY_LOCK "lck_mtx_try_lock" 41 #define LS_LCK_MTX_UNLOCK "lck_mtx_unlock" 42 43 #define LS_LCK_SPIN_LOCK "lck_spin_lock" 44 #define LS_LCK_SPIN_TRY_LOCK "lck_spin_try_lock" 45 #define LS_LCK_SPIN_UNLOCK "lck_spin_unlock" 46 #define LS_LCK_RW_LOCK_SHARED "lck_rw_lock_shared" 47 #define LS_LCK_RW_LOCK_EXCL "lck_rw_lock_exclusive" 48 #define LS_LCK_RW_DONE "lck_rw_done" 49 #define LS_LCK_RW_TRY_LOCK_EXCL "lck_rw_try_lock_exclusive" 50 #define LS_LCK_RW_TRY_LOCK_SHARED "lck_rw_try_lock_shared" 51 #define LS_LCK_RW_LOCK_SHARED_TO_EXCL "lck_rw_lock_shared_to_exclusive" 52 #define LS_LCK_RW_LOCK_EXCL_TO_SHARED "lck_rw_lock_exclusive_to_shared" 53 #define LS_LCK_TICKET_LOCK "lck_ticket_lock" 54 #define LS_LCK_TICKET_UNLOCK "lck_ticket_unlock" 55 56 57 #define LS_ACQUIRE "acquire" 58 #define LS_RELEASE "release" 59 #define LS_SPIN "spin" 60 #define LS_BLOCK "block" 61 #define LS_UPGRADE "upgrade" 62 #define LS_DOWNGRADE "downgrade" 63 64 #define LS_TYPE_ADAPTIVE "adaptive" /* this really means "mutex" */ 65 #define LS_TYPE_SPIN "spin" 66 #define LS_TYPE_RW "rw" 67 #define LS_TYPE_TICKET "ticket" 68 69 #define LSA_ACQUIRE (LS_TYPE_ADAPTIVE "-" LS_ACQUIRE) 70 #define LSA_RELEASE (LS_TYPE_ADAPTIVE "-" LS_RELEASE) 71 #define LSA_SPIN (LS_TYPE_ADAPTIVE "-" LS_SPIN) 72 #define LSA_BLOCK (LS_TYPE_ADAPTIVE "-" LS_BLOCK) 73 #define LSS_ACQUIRE (LS_TYPE_SPIN "-" LS_ACQUIRE) 74 #define LSS_RELEASE (LS_TYPE_SPIN "-" LS_RELEASE) 75 #define LSS_SPIN (LS_TYPE_SPIN "-" LS_SPIN) 76 #define LSR_ACQUIRE (LS_TYPE_RW "-" LS_ACQUIRE) 77 #define LSR_RELEASE (LS_TYPE_RW "-" LS_RELEASE) 78 #define LSR_BLOCK (LS_TYPE_RW "-" LS_BLOCK) 79 #define LSR_SPIN (LS_TYPE_RW "-" LS_SPIN) 80 #define LSR_UPGRADE (LS_TYPE_RW "-" LS_UPGRADE) 81 #define LSR_DOWNGRADE (LS_TYPE_RW "-" LS_DOWNGRADE) 82 #define LST_ACQUIRE (LS_TYPE_TICKET "-" LS_ACQUIRE) 83 #define LST_RELEASE (LS_TYPE_TICKET "-" LS_RELEASE) 84 #define LST_SPIN (LS_TYPE_TICKET "-" LS_SPIN) 85 86 #ifdef __cplusplus 87 } 88 #endif 89 90 #endif /* _SYS_LOCKSTAT_H */ 91