comparison src/se/native/com/oracle/dio/dio_common.cpp @ 257:67353093ce02

DIO-23: [I2C] UnavailableDeviceException when Zulu JRE is used > Reviewed-by: duke
author snazarki
date Thu, 02 Feb 2017 15:09:24 +0300
parents 5c8f58479d59
children ff88da88dd88
comparison
equal deleted inserted replaced
6:c6cff5b42564 7:815ee429d0b6
437 /* 437 /*
438 * Tries locking the device. 438 * Tries locking the device.
439 * Class: com_oracle_dio_impl_Handle 439 * Class: com_oracle_dio_impl_Handle
440 * Method: tryLock 440 * Method: tryLock
441 */ 441 */
442 JNIEXPORT void JNICALL Java_com_oracle_dio_impl_Handle_tryLock 442 JNIEXPORT bool JNICALL Java_com_oracle_dio_impl_Handle_tryLock
443 (JNIEnv* env, jobject obj, jint timeout) { 443 (JNIEnv* env, jobject obj, jint timeout) {
444 device_reference device = getDeviceReferenceFromHandleObject(env, obj); 444 device_reference device = getDeviceReferenceFromHandleObject(env, obj);
445 if (device != INVALID_DEVICE_REFERENCE) { 445 if (device != INVALID_DEVICE_REFERENCE) {
446 // add an implementation 446 // add an implementation
447 } 447 }
448
449 return true;
448 } 450 }
449 451
450 /* 452 /*
451 * Unlocks the device. 453 * Unlocks the device.
452 * Class: com_oracle_dio_impl_Handle 454 * Class: com_oracle_dio_impl_Handle