Print this page
5042 stop using deprecated atomic functions
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/sparc/sys/synch32.h
+++ new/usr/src/uts/sparc/sys/synch32.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
↓ open down ↓ |
19 lines elided |
↑ open up ↑ |
20 20 */
21 21
22 22 /*
23 23 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
24 24 * Use is subject to license terms.
25 25 */
26 26
27 27 #ifndef _SYS_SYNCH32_H
28 28 #define _SYS_SYNCH32_H
29 29
30 -#pragma ident "%Z%%M% %I% %E% SMI"
31 -
32 30 #ifdef __cplusplus
33 31 extern "C" {
34 32 #endif
35 33
36 34 /* special defines for LWP mutexes */
37 35 #define mutex_flag flags.flag1
38 36 #define mutex_ceiling flags.ceiling
39 37 #define mutex_type flags.mbcp_type_un.mtype_rcount.count_type2
40 38 #define mutex_rcount flags.mbcp_type_un.mtype_rcount.count_type1
41 39 #define mutex_magic flags.magic
42 40 #define mutex_owner data
43 41 /* used to atomically operate on whole word via cas or swap instruction */
44 42 #define mutex_lockword lock.lock32.lockword
45 -/* this requires cas64 */
43 +/* this requires atomic_cas_64 */
46 44 #define mutex_lockword64 lock.owner64
47 45 /* these are bytes */
48 46 #define mutex_lockw lock.lock64.pad[4]
49 47 #define mutex_waiters lock.lock64.pad[7]
50 48 #define mutex_spinners lock.lock64.pad[5]
51 49
52 50 /* process-shared lock owner pid */
53 51 #define mutex_ownerpid lock.lock32.ownerpid
54 52
55 53 /* Max. recusrion count for recursive mutexes */
56 54 #define RECURSION_MAX 255
57 55
58 56 /* special defines for LWP condition variables */
59 57 #define cond_type flags.type
60 58 #define cond_magic flags.magic
61 59 #define cond_clockid flags.flag[1]
62 60 #define cond_waiters_user flags.flag[2]
63 61 #define cond_waiters_kernel flags.flag[3]
64 62
65 63 /* special defines for LWP semaphores */
66 64 #define sema_count count
67 65 #define sema_type type
68 66 #define sema_waiters flags[7]
69 67
70 68 /* special defines for LWP rwlocks */
71 69 #define rwlock_readers readers
72 70 #define rwlock_type type
73 71 #define rwlock_magic magic
74 72 #define rwlock_owner readercv.data
75 73 #define rwlock_ownerpid writercv.data
76 74
77 75 #define URW_HAS_WAITERS 0x80000000
78 76 #define URW_WRITE_LOCKED 0x40000000
79 77 #define URW_READERS_MASK 0x3fffffff
80 78
81 79 #ifdef __cplusplus
82 80 }
83 81 #endif
84 82
85 83 #endif /* _SYS_SYNCH32_H */
↓ open down ↓ |
30 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX