int main() { int m,n,**a,j,i; printf("Enter the number of rows in the matrix\n"); scanf("%d",&m); printf("Enter the number of columns in the matrix\n"); scanf("%d",&n); a=(int **)malloc(m*sizeof(int *)); for(i=0;i<m;i++) a[i]=(int *)(malloc(n*sizeof(int))); printf("Enter the elements in the matrix\n"); for(i=0;i<m;i++) for(j=0;j<n;j++) scanf("%d",&a[i][j]); printf("The matrix is\n"); for(i=0;i<m;i++) { for(j=0;j<n;j++) printf("%d ",a[i][j]); printf("\n"); } if(checkNull(a,m,n)) printf("The matrix is null\n"); else printf("The matrix is not null\n"); return 0; }
Array& Array::addRedisType(RedisType::Ptr value) { checkNull(); _elements.value().push_back(value); return *this; }
jint Java_sun_misc_Unsafe_getIntVolatile(Env* env, Object* unsafe, Object* obj, jlong offset) { if (!checkNull(env, obj)) return 0; jint* address = (jint*) getFieldAddress(obj, offset); return rvmAtomicLoadInt(address); }
jint Java_sun_misc_Unsafe_getInt(Env* env, Object* unsafe, Object* obj, jlong offset) { if (!checkNull(env, obj)) return 0; jint* address = (jint*) getFieldAddress(obj, offset); return *address; }
jboolean Java_sun_misc_Unsafe_compareAndSwapObject(Env* env, Object* unsafe, Object* obj, jlong offset, Object* expectedValue, Object* newValue) { if (!checkNull(env, obj)) return FALSE; void** address = (void**) getFieldAddress(obj, offset); return rvmAtomicCompareAndSwapPtr(address, expectedValue, newValue); }
jboolean Java_sun_misc_Unsafe_compareAndSwapInt(Env* env, Object* unsafe, Object* obj, jlong offset, jint expectedValue, jint newValue) { if (!checkNull(env, obj)) return FALSE; jint* address = (jint*) getFieldAddress(obj, offset); return rvmAtomicCompareAndSwapInt(address, expectedValue, newValue); }
jlong Java_sun_misc_Unsafe_objectFieldOffset0(Env* env, Object* unsafe, Object* fieldObject) { if (!checkNull(env, fieldObject)) return 0; InstanceField* field = (InstanceField*) getFieldFromFieldObject(env, fieldObject); if (!field) return 0; return field->offset; }
void Java_sun_misc_Unsafe_putOrderedObject(Env* env, Object* unsafe, Object* obj, jlong offset, Object* newValue) { if (!checkNull(env, obj)) return; Object** address = (Object**) getFieldAddress(obj, offset); rvmAtomicSynchronize(); *address = newValue; }
void Java_sun_misc_Unsafe_putObjectVolatile(Env* env, Object* unsafe, Object* obj, jlong offset, Object* newValue) { if (!checkNull(env, obj)) return; Object** address = (Object**) getFieldAddress(obj, offset); rvmAtomicStorePtr((void**) address, newValue); }
void Java_sun_misc_Unsafe_putLongVolatile(Env* env, Object* unsafe, Object* obj, jlong offset, jlong newValue) { if (!checkNull(env, obj)) return; jlong* address = (jlong*) getFieldAddress(obj, offset); rvmAtomicStoreLong(address, newValue); }
void Java_sun_misc_Unsafe_putLong(Env* env, Object* unsafe, Object* obj, jlong offset, jlong newValue) { if (!checkNull(env, obj)) return; jlong* address = (jlong*) getFieldAddress(obj, offset); *address = newValue; }
Object* Java_sun_misc_Unsafe_getObjectVolatile(Env* env, Object* unsafe, Object* obj, jlong offset) { if (!checkNull(env, obj)) return NULL; Object** address = (Object**) getFieldAddress(obj, offset); return (Object*) rvmAtomicLoadPtr((void**) address); }
Object* Java_sun_misc_Unsafe_getObject(Env* env, Object* unsafe, Object* obj, jlong offset) { if (!checkNull(env, obj)) return NULL; Object** address = (Object**) getFieldAddress(obj, offset); return *address; }