use of org.graalvm.nativeimage.c.function.CEntryPoint in project graal by oracle.
the class NativeClosure method invokeClosureStringRet.
@CEntryPoint
@CEntryPointOptions(prologue = EnterClosureDataIsolatePrologue.class, publishAs = Publish.NotPublished, include = CEntryPointOptions.NotIncludedAutomatically.class)
static void invokeClosureStringRet(@SuppressWarnings("unused") ffi_cif cif, WordPointer ret, WordPointer args, ClosureData user) {
CIntPointer errnoMirror = ErrnoMirror.getErrnoMirrorLocation();
errnoMirror.write(Errno.errno());
try {
Object retValue = lookup(user).call(args, null);
ret.write(serializeStringRet(retValue));
} finally {
Errno.set_errno(errnoMirror.read());
}
}
Aggregations