146 template<> HIDDEN
147 void arraycopy_conjoint_atomic<jshort>(jshort* src, jshort* dst, size_t length) {
148 Copy::conjoint_jshorts_atomic(src, dst, length);
149 }
150
151 template<> HIDDEN
152 void arraycopy_conjoint_atomic<jint>(jint* src, jint* dst, size_t length) {
153 Copy::conjoint_jints_atomic(src, dst, length);
154 }
155
156 template<> HIDDEN
157 void arraycopy_conjoint_atomic<jlong>(jlong* src, jlong* dst, size_t length) {
158 Copy::conjoint_jlongs_atomic(src, dst, length);
159 }
160
161 template<> HIDDEN
162 void arraycopy_conjoint_atomic<void>(void* src, void* dst, size_t length) {
163 Copy::conjoint_memory_atomic(src, dst, length);
164 }
165
166 #ifdef ASSERT
167 void check_access_thread_state() {
168 if (VMError::is_error_reported() || DebuggingContext::is_enabled()) {
169 return;
170 }
171
172 Thread* thread = Thread::current();
173 if (!thread->is_Java_thread()) {
174 return;
175 }
176
177 JavaThread* java_thread = JavaThread::cast(thread);
178 JavaThreadState state = java_thread->thread_state();
179 assert(state == _thread_in_vm || state == _thread_in_Java || state == _thread_new,
180 "Wrong thread state for accesses: %d", (int)state);
181 }
182 #endif
183 }
|
146 template<> HIDDEN
147 void arraycopy_conjoint_atomic<jshort>(jshort* src, jshort* dst, size_t length) {
148 Copy::conjoint_jshorts_atomic(src, dst, length);
149 }
150
151 template<> HIDDEN
152 void arraycopy_conjoint_atomic<jint>(jint* src, jint* dst, size_t length) {
153 Copy::conjoint_jints_atomic(src, dst, length);
154 }
155
156 template<> HIDDEN
157 void arraycopy_conjoint_atomic<jlong>(jlong* src, jlong* dst, size_t length) {
158 Copy::conjoint_jlongs_atomic(src, dst, length);
159 }
160
161 template<> HIDDEN
162 void arraycopy_conjoint_atomic<void>(void* src, void* dst, size_t length) {
163 Copy::conjoint_memory_atomic(src, dst, length);
164 }
165
166 void value_copy_internal(void* src, void* dst, size_t length) {
167 Copy::copy_value_content(src, dst, length);
168 }
169
170 void value_store_null(void* dst, size_t length) {
171 Copy::clear_value_content(dst, length);
172 }
173
174 #ifdef ASSERT
175 void check_access_thread_state() {
176 if (VMError::is_error_reported() || DebuggingContext::is_enabled()) {
177 return;
178 }
179
180 Thread* thread = Thread::current();
181 if (!thread->is_Java_thread()) {
182 return;
183 }
184
185 JavaThread* java_thread = JavaThread::cast(thread);
186 JavaThreadState state = java_thread->thread_state();
187 assert(state == _thread_in_vm || state == _thread_in_Java || state == _thread_new,
188 "Wrong thread state for accesses: %d", (int)state);
189 }
190 #endif
191 }
|