![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
openjdk
wocan23
编程爱好者
展开
-
Unsafe类getBoolean方法解析
以Unsafe类的下列方法为例子public native boolean getBoolean(Object var1, long var2);java本地方法以jni调用实现(jni如何调用先不做介绍),按照jni中java方法和c方法的对应关系,那么在c中名称应该为jboolean, Unsafe_GetBoolean(JNIEnv *env, jobject unsafe...原创 2020-01-10 10:59:35 · 314 阅读 · 0 评论 -
Unsafe类Unsafe_CompareAndSwapInt解析
对应的cpp代码为UNSAFE_ENTRY(jboolean, Unsafe_CompareAndSwapInt(JNIEnv *env, jobject unsafe, jobject obj, jlong offset, jint e, jint x)) UnsafeWrapper("Unsafe_CompareAndSwapInt"); oop p = JNIHandles::...原创 2020-01-10 11:01:27 · 1107 阅读 · 0 评论