Where can I find the source code for `native` methods in Java library? -


in sun.misc package, saw these methods under unsafe class.

public final native boolean compareandswapobject(object var1, long var2, object var4, object var5);  public final native boolean compareandswapint(object var1, long var2, int var4, int var5);  public final native boolean compareandswaplong(object var1, long var2, long var4, long var6); 

it seems these methods atomic , written in c, can't find source code these method on github.. have ideas this? how can find open-source implementation these methods easily?

you can check out openjdk code here: http://hg.openjdk.java.net/jdk8/jdk8/hotspot/file/tip/src/share/vm/prims/unsafe.cpp


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -