1
1

oshmem java: really abort in bad situations

The previous condition just called assert(), which is a no-op in
non-debug builds.  Change it to print a message and then call abort()
to really actually above.

This was CID 1270155.
Этот коммит содержится в:
Jeff Squyres 2015-02-14 07:05:50 -08:00
родитель dfd21e465d
Коммит b27ba475ef

Просмотреть файл

@ -633,12 +633,15 @@ JNIEXPORT jboolean JNICALL Java_shmem_Addr_testLock(
{
int r = shmem_test_lock((long*)addr);
if(r == 0)
if (0 == r) {
return JNI_FALSE;
else if(r == 1)
} else if (1 == r) {
return JNI_TRUE;
else
assert(0);
}
/* Should never get here */
opal_output(0, "*** Java lock is neither true nor false; something is very wrong!");
abort();
}
JNIEXPORT void JNICALL Java_shmem_Addr_waitShort(