65 volatile intptr_t FullWord ;
66 volatile void * Address ;
67 volatile jbyte Bytes [sizeof(intptr_t)] ;
68 } ;
69
70 // Endian-ness ... index of least-significant byte in SplitWord.Bytes[]
71 #ifdef VM_LITTLE_ENDIAN
72 #define _LSBINDEX 0
73 #else
74 #define _LSBINDEX (sizeof(intptr_t)-1)
75 #endif
76
77 class ParkEvent ;
78
79 // See orderAccess.hpp. We assume throughout the VM that mutex lock and
80 // try_lock do fence-lock-acquire, and that unlock does a release-unlock,
81 // *in that order*. If their implementations change such that these
82 // assumptions are violated, a whole lot of code will break.
83
84 // The default length of monitor name is chosen to be 64 to avoid false sharing.
85 static const int MONITOR_NAME_LEN = 64;
86
87 class Monitor : public CHeapObj<mtInternal> {
88
89 public:
90 // A special lock: Is a lock where you are guaranteed not to block while you are
91 // holding it, i.e., no vm operation can happen, taking other locks, etc.
92 // NOTE: It is critical that the rank 'special' be the lowest (earliest)
93 // (except for "event"?) for the deadlock detection to work correctly.
94 // The rank native is only for use in Mutex's created by JVM_RawMonitorCreate,
95 // which being external to the VM are not subject to deadlock detection.
96 // The rank safepoint is used only for synchronization in reaching a
97 // safepoint and leaving a safepoint. It is only used for the Safepoint_lock
98 // currently. While at a safepoint no mutexes of rank safepoint are held
99 // by any thread.
100 // The rank named "leaf" is probably historical (and should
101 // be changed) -- mutexes of this rank aren't really leaf mutexes
102 // at all.
103 enum lock_types {
104 event,
105 special,
|
65 volatile intptr_t FullWord ;
66 volatile void * Address ;
67 volatile jbyte Bytes [sizeof(intptr_t)] ;
68 } ;
69
70 // Endian-ness ... index of least-significant byte in SplitWord.Bytes[]
71 #ifdef VM_LITTLE_ENDIAN
72 #define _LSBINDEX 0
73 #else
74 #define _LSBINDEX (sizeof(intptr_t)-1)
75 #endif
76
77 class ParkEvent ;
78
79 // See orderAccess.hpp. We assume throughout the VM that mutex lock and
80 // try_lock do fence-lock-acquire, and that unlock does a release-unlock,
81 // *in that order*. If their implementations change such that these
82 // assumptions are violated, a whole lot of code will break.
83
84 // The default length of monitor name is chosen to be 64 to avoid false sharing.
85 static const int MONITOR_NAME_LEN = 64 S390_ONLY(+192);
86
87 class Monitor : public CHeapObj<mtInternal> {
88
89 public:
90 // A special lock: Is a lock where you are guaranteed not to block while you are
91 // holding it, i.e., no vm operation can happen, taking other locks, etc.
92 // NOTE: It is critical that the rank 'special' be the lowest (earliest)
93 // (except for "event"?) for the deadlock detection to work correctly.
94 // The rank native is only for use in Mutex's created by JVM_RawMonitorCreate,
95 // which being external to the VM are not subject to deadlock detection.
96 // The rank safepoint is used only for synchronization in reaching a
97 // safepoint and leaving a safepoint. It is only used for the Safepoint_lock
98 // currently. While at a safepoint no mutexes of rank safepoint are held
99 // by any thread.
100 // The rank named "leaf" is probably historical (and should
101 // be changed) -- mutexes of this rank aren't really leaf mutexes
102 // at all.
103 enum lock_types {
104 event,
105 special,
|