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 #ifdef ASSERT
171 void check_access_thread_state() {
172 if (VMError::is_error_reported() || DebuggingContext::is_enabled()) {
173 return;
174 }
175
176 Thread* thread = Thread::current();
177 if (!thread->is_Java_thread()) {
178 return;
179 }
180
181 JavaThread* java_thread = JavaThread::cast(thread);
182 JavaThreadState state = java_thread->thread_state();
183 assert(state == _thread_in_vm || state == _thread_in_Java || state == _thread_new,
184 "Wrong thread state for accesses: %d", (int)state);
185 }
186 #endif
187 }
|