예제 #1
0
 public static LLVMTypeRef WakerType(this ContextWrapper context) => context.StructType(
     new LLVMTypeRef[]
 {
     // task function pointer
     LLVMTypeRef.PointerType(context.ScheduledTaskFunctionType(), 0u),
     // task state
     context.VoidPointerType()
 });
예제 #2
0
 private static LLVMTypeRef MethodPollFunctionType(this ContextWrapper context) => LLVMTypeRef.FunctionType(
     context.VoidType,
     new LLVMTypeRef[]
 {
     context.VoidPointerType(),
     LLVMTypeRef.PointerType(context.ScheduledTaskFunctionType(), 0u),
     context.VoidPointerType()
 },
     false);
 public static LLVMTypeRef PollFunctionType(ContextWrapper context) => LLVMTypeRef.FunctionType(
     context.VoidType,
     new LLVMTypeRef[]
 {
     context.VoidPointerType(),
     LLVMTypeRef.PointerType(context.ScheduledTaskFunctionType(), 0u),
     context.VoidPointerType()
 },
     false);
예제 #4
0
 public static LLVMTypeRef GetScheduledTaskType(this ContextWrapper context)
 {
     return(context.GetCachedStructType("scheduled_task", () => new[]
     {
         // task function pointer
         LLVMTypeRef.PointerType(context.ScheduledTaskFunctionType(), 0u),
         // task state
         context.VoidPointerType()
     }));
 }