@Retention(value=RUNTIME) public @interface IgnoreError
Due to the nature of the Java Virtual Machine, the errno value must be saved immediately after the native function is called, otherwise internal jvm operations may overwrite it before control is returned to java code.
Since it is not possible for jnr-ffi to infer in a generic way whether a native
function has succeeded or failed, the C errno value is saved after every native
function call - even for the ones that succeed. This can have a significant
performance impact, so for those functions which either don't fail, or for which
the errno value can be ignored, can be annotated with @IgnoreError
to
avoid unneccessary saving of the errno value.
Copyright © 2017. All rights reserved.