Example #1
0
void VM_ThreadStop::doit() {
  assert(SafepointSynchronize::is_at_safepoint(), "must be at a safepoint");
  JavaThread* target = java_lang_Thread::thread(target_thread());
  // Note that this now allows multiple ThreadDeath exceptions to be
  // thrown at a thread.
  if (target != NULL) {
    // the thread has run and is not already in the process of exiting
    target->send_thread_stop(throwable());
  }
}
Example #2
0
void VM_ThreadStop::doit() {
  assert(SafepointSynchronize::is_at_safepoint(), "must be at a safepoint");
  JavaThread* target = java_lang_Thread::thread(target_thread());
  // Note that this now allows multiple ThreadDeath exceptions to be
  // thrown at a thread.
  if (target != NULL) {
    // the thread has run and is not already in the process of exiting
	printf("%s[%d] [tid: %lu]: 试图终止线程[%s]...\n", __FILE__, __LINE__, pthread_self(), target->name());
    target->send_thread_stop(throwable());
  }
}