src/share/vm/runtime/java.hpp

changeset 3117
eca1193ca245
parent 2497
3582bf76420e
child 3767
9d679effd28c
equal deleted inserted replaced
3116:05550041d664 3117:eca1193ca245
90 // If partially initialized, the above fields are invalid and we know 90 // If partially initialized, the above fields are invalid and we know
91 // that we're less than major version 6. 91 // that we're less than major version 6.
92 bool _partially_initialized; 92 bool _partially_initialized;
93 93
94 bool _thread_park_blocker; 94 bool _thread_park_blocker;
95 bool _pending_list_uses_discovered_field;
95 bool _post_vm_init_hook_enabled; 96 bool _post_vm_init_hook_enabled;
96 97
97 bool is_valid() const { 98 bool is_valid() const {
98 return (_major != 0 || _partially_initialized); 99 return (_major != 0 || _partially_initialized);
99 } 100 }
112 return _current._partially_initialized; 113 return _current._partially_initialized;
113 } 114 }
114 115
115 JDK_Version() : _major(0), _minor(0), _micro(0), _update(0), 116 JDK_Version() : _major(0), _minor(0), _micro(0), _update(0),
116 _special(0), _build(0), _partially_initialized(false), 117 _special(0), _build(0), _partially_initialized(false),
117 _thread_park_blocker(false), _post_vm_init_hook_enabled(false) {} 118 _thread_park_blocker(false), _post_vm_init_hook_enabled(false),
119 _pending_list_uses_discovered_field(false) {}
118 120
119 JDK_Version(uint8_t major, uint8_t minor = 0, uint8_t micro = 0, 121 JDK_Version(uint8_t major, uint8_t minor = 0, uint8_t micro = 0,
120 uint8_t update = 0, uint8_t special = 0, uint8_t build = 0, 122 uint8_t update = 0, uint8_t special = 0, uint8_t build = 0,
121 bool thread_park_blocker = false, bool post_vm_init_hook_enabled = false) : 123 bool thread_park_blocker = false, bool post_vm_init_hook_enabled = false,
124 bool pending_list_uses_discovered_field = false) :
122 _major(major), _minor(minor), _micro(micro), _update(update), 125 _major(major), _minor(minor), _micro(micro), _update(update),
123 _special(special), _build(build), _partially_initialized(false), 126 _special(special), _build(build), _partially_initialized(false),
124 _thread_park_blocker(thread_park_blocker), 127 _thread_park_blocker(thread_park_blocker),
125 _post_vm_init_hook_enabled(post_vm_init_hook_enabled) {} 128 _post_vm_init_hook_enabled(post_vm_init_hook_enabled),
129 _pending_list_uses_discovered_field(pending_list_uses_discovered_field) {}
126 130
127 // Returns the current running JDK version 131 // Returns the current running JDK version
128 static JDK_Version current() { return _current; } 132 static JDK_Version current() { return _current; }
129 133
130 // Factory methods for convenience 134 // Factory methods for convenience
146 bool supports_thread_park_blocker() const { 150 bool supports_thread_park_blocker() const {
147 return _thread_park_blocker; 151 return _thread_park_blocker;
148 } 152 }
149 bool post_vm_init_hook_enabled() const { 153 bool post_vm_init_hook_enabled() const {
150 return _post_vm_init_hook_enabled; 154 return _post_vm_init_hook_enabled;
155 }
156 // For compatibility wrt pre-4965777 JDK's
157 bool pending_list_uses_discovered_field() const {
158 return _pending_list_uses_discovered_field;
151 } 159 }
152 160
153 // Performs a full ordering comparison using all fields (update, build, etc.) 161 // Performs a full ordering comparison using all fields (update, build, etc.)
154 int compare(const JDK_Version& other) const; 162 int compare(const JDK_Version& other) const;
155 163

mercurial