Search in sources :

Example 1 with CFunctionOptions

use of com.oracle.svm.core.c.function.CFunctionOptions in project graal by oracle.

the class CFunctionSubstitutionProcessor method getNewThreadStatus.

private static int getNewThreadStatus(ResolvedJavaMethod method) {
    CFunctionOptions cFunctionOptions = method.getAnnotation(CFunctionOptions.class);
    if (cFunctionOptions != null) {
        return StatusSupport.getNewThreadStatus(cFunctionOptions.transition());
    }
    CFunction cFunctionAnnotation = method.getAnnotation(CFunction.class);
    if (cFunctionAnnotation != null) {
        return StatusSupport.getNewThreadStatus(cFunctionAnnotation.transition());
    }
    throw VMError.shouldNotReachHere("Method is not annotated with " + CFunction.class.getSimpleName());
}
Also used : CFunctionOptions(com.oracle.svm.core.c.function.CFunctionOptions) CFunction(org.graalvm.nativeimage.c.function.CFunction)

Aggregations

CFunctionOptions (com.oracle.svm.core.c.function.CFunctionOptions)1 CFunction (org.graalvm.nativeimage.c.function.CFunction)1