< prev index next >
src/hotspot/share/logging/logOutputList.cpp
Print this page
@@ -28,17 +28,17 @@
#include "runtime/atomic.hpp"
#include "runtime/orderAccess.hpp"
#include "utilities/globalDefinitions.hpp"
jint LogOutputList::increase_readers() {
- jint result = Atomic::add(1, &_active_readers);
+ jint result = Atomic::add(&_active_readers, 1);
assert(_active_readers > 0, "Ensure we have consistent state");
return result;
}
jint LogOutputList::decrease_readers() {
- jint result = Atomic::add(-1, &_active_readers);
+ jint result = Atomic::add(&_active_readers, -1);
assert(result >= 0, "Ensure we have consistent state");
return result;
}
void LogOutputList::wait_until_no_readers() const {
< prev index next >