5844 |
5845 |
5845 if (_counter > 0) { // no wait needed |
5846 if (_counter > 0) { // no wait needed |
5846 _counter = 0; |
5847 _counter = 0; |
5847 status = os::Solaris::mutex_unlock(_mutex); |
5848 status = os::Solaris::mutex_unlock(_mutex); |
5848 assert (status == 0, "invariant") ; |
5849 assert (status == 0, "invariant") ; |
|
5850 OrderAccess::fence(); |
5849 return; |
5851 return; |
5850 } |
5852 } |
5851 |
5853 |
5852 #ifdef ASSERT |
5854 #ifdef ASSERT |
5853 // Don't catch signals while blocked; let the running threads have the signals. |
5855 // Don't catch signals while blocked; let the running threads have the signals. |
5890 // If externally suspended while waiting, re-suspend |
5892 // If externally suspended while waiting, re-suspend |
5891 if (jt->handle_special_suspend_equivalent_condition()) { |
5893 if (jt->handle_special_suspend_equivalent_condition()) { |
5892 jt->java_suspend_self(); |
5894 jt->java_suspend_self(); |
5893 } |
5895 } |
5894 |
5896 |
|
5897 OrderAccess::fence(); |
5895 } |
5898 } |
5896 |
5899 |
5897 void Parker::unpark() { |
5900 void Parker::unpark() { |
5898 int s, status ; |
5901 int s, status ; |
5899 status = os::Solaris::mutex_lock (_mutex) ; |
5902 status = os::Solaris::mutex_lock (_mutex) ; |