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());
}
Aggregations