src/os/bsd/vm/os_bsd.cpp

changeset 4675
63e54c37ac64
parent 4608
5cd2fac2ae70
child 4696
bdb602473679
child 4711
6b803ba47588
     1.1 --- a/src/os/bsd/vm/os_bsd.cpp	Fri Feb 22 10:16:51 2013 -0800
     1.2 +++ b/src/os/bsd/vm/os_bsd.cpp	Wed Feb 27 09:40:30 2013 +0100
     1.3 @@ -2695,7 +2695,7 @@
     1.4    assert(thread->is_VM_thread(), "Must be VMThread");
     1.5    // read current suspend action
     1.6    int action = osthread->sr.suspend_action();
     1.7 -  if (action == SR_SUSPEND) {
     1.8 +  if (action == os::Bsd::SuspendResume::SR_SUSPEND) {
     1.9      suspend_save_context(osthread, siginfo, context);
    1.10  
    1.11      // Notify the suspend action is about to be completed. do_suspend()
    1.12 @@ -2717,12 +2717,12 @@
    1.13      do {
    1.14        sigsuspend(&suspend_set);
    1.15        // ignore all returns until we get a resume signal
    1.16 -    } while (osthread->sr.suspend_action() != SR_CONTINUE);
    1.17 +    } while (osthread->sr.suspend_action() != os::Bsd::SuspendResume::SR_CONTINUE);
    1.18  
    1.19      resume_clear_context(osthread);
    1.20  
    1.21    } else {
    1.22 -    assert(action == SR_CONTINUE, "unexpected sr action");
    1.23 +    assert(action == os::Bsd::SuspendResume::SR_CONTINUE, "unexpected sr action");
    1.24      // nothing special to do - just leave the handler
    1.25    }
    1.26  
    1.27 @@ -2776,7 +2776,7 @@
    1.28  // but this seems the normal response to library errors
    1.29  static bool do_suspend(OSThread* osthread) {
    1.30    // mark as suspended and send signal
    1.31 -  osthread->sr.set_suspend_action(SR_SUSPEND);
    1.32 +  osthread->sr.set_suspend_action(os::Bsd::SuspendResume::SR_SUSPEND);
    1.33    int status = pthread_kill(osthread->pthread_id(), SR_signum);
    1.34    assert_status(status == 0, status, "pthread_kill");
    1.35  
    1.36 @@ -2785,18 +2785,18 @@
    1.37      for (int i = 0; !osthread->sr.is_suspended(); i++) {
    1.38        os::yield_all(i);
    1.39      }
    1.40 -    osthread->sr.set_suspend_action(SR_NONE);
    1.41 +    osthread->sr.set_suspend_action(os::Bsd::SuspendResume::SR_NONE);
    1.42      return true;
    1.43    }
    1.44    else {
    1.45 -    osthread->sr.set_suspend_action(SR_NONE);
    1.46 +    osthread->sr.set_suspend_action(os::Bsd::SuspendResume::SR_NONE);
    1.47      return false;
    1.48    }
    1.49  }
    1.50  
    1.51  static void do_resume(OSThread* osthread) {
    1.52    assert(osthread->sr.is_suspended(), "thread should be suspended");
    1.53 -  osthread->sr.set_suspend_action(SR_CONTINUE);
    1.54 +  osthread->sr.set_suspend_action(os::Bsd::SuspendResume::SR_CONTINUE);
    1.55  
    1.56    int status = pthread_kill(osthread->pthread_id(), SR_signum);
    1.57    assert_status(status == 0, status, "pthread_kill");
    1.58 @@ -2806,7 +2806,7 @@
    1.59        os::yield_all(i);
    1.60      }
    1.61    }
    1.62 -  osthread->sr.set_suspend_action(SR_NONE);
    1.63 +  osthread->sr.set_suspend_action(os::Bsd::SuspendResume::SR_NONE);
    1.64  }
    1.65  
    1.66  ////////////////////////////////////////////////////////////////////////////////

mercurial