Snippets for calling from Java to C. This is the inverse of
CEntryPointSnippets.
The Java frame anchor has to be set up because the top of the stack will no longer be a Java
frame.
In addition I might have to transition the thread state from being in Java code to being in
native code on the way in, and to transition the thread state from native code to Java code on
the way out. The transition is optional, based on the value of the CFunction
annotation.
Among the complications is that the C function may try to return while a safepoint is in
progress. It must not be allowed back into Java code until the safepoint is finished.