< prev index next >
src/hotspot/os/linux/os_linux.cpp
Print this page
@@ -2750,11 +2750,11 @@
static int check_pending_signals() {
for (;;) {
for (int i = 0; i < NSIG + 1; i++) {
jint n = pending_signals[i];
- if (n > 0 && n == Atomic::cmpxchg(n - 1, &pending_signals[i], n)) {
+ if (n > 0 && n == Atomic::cmpxchg(&pending_signals[i], n, n - 1)) {
return i;
}
}
JavaThread *thread = JavaThread::current();
ThreadBlockInVM tbivm(thread);
@@ -2811,11 +2811,11 @@
if (!UseOprofile) {
return;
}
char buf[PATH_MAX+1];
- int num = Atomic::add(1, &cnt);
+ int num = Atomic::add(&cnt, 1);
snprintf(buf, sizeof(buf), "%s/hs-vm-%d-%d",
os::get_temp_directory(), os::current_process_id(), num);
unlink(buf);
< prev index next >