Beispiel #1
0
 private int AddHandleFunc(int fd, int events, EventHandleCallback cb, IntPtr opaque, FreeCallback ff)
 {
     _fd = fd;
     _event = (EventHandleType)events;
     _cb = cb;
     _ff = ff;
     _opaque = opaque;
     return 0;
 }
 private int AddTimeoutFunc(int timeout, EventTimeoutCallback cb, IntPtr opaque, FreeCallback ff)
 {
     _active = 1;
         _timeout = timeout;
         _tcb = cb;
         _ff = ff;
         _opaque = opaque;
         return 0;
 }
 public static unsafe int EnqueueSvmfree(this ArmSharedVirtualMemory thisApi, [Flow(FlowDirection.In)] nint command_queue, [Flow(FlowDirection.In)] uint num_svm_pointers, [Flow(FlowDirection.Out)] void *svm_pointers, [Flow(FlowDirection.In), PinObjectAttribute(PinMode.UntilNextCall)] FreeCallback pfn_free_func, [Flow(FlowDirection.Out)] void *user_data, [Flow(FlowDirection.In)] uint num_events_in_wait_list, [Flow(FlowDirection.In)] nint *event_wait_list, [Flow(FlowDirection.Out)] Span <nint> @event)
 {
     // SpanOverloader
     return(thisApi.EnqueueSvmfree(command_queue, num_svm_pointers, svm_pointers, pfn_free_func, user_data, num_events_in_wait_list, event_wait_list, out @event.GetPinnableReference()));
 }
Beispiel #4
0
 public Callbacks(AllocCallback allocCallback, FreeCallback freeCallback, NoMemoryCallback noMemoryCallback)
 {
     nativeCallbacks.malloc   = allocCallback;
     nativeCallbacks.free     = freeCallback;
     nativeCallbacks.noMemory = noMemoryCallback;
 }
 public static unsafe int EnqueueSvmfree <T0, T1>(this ArmSharedVirtualMemory thisApi, [Flow(FlowDirection.In)] nint command_queue, [Flow(FlowDirection.In)] uint num_svm_pointers, [Flow(FlowDirection.Out)] Span <T0> svm_pointers, [Flow(FlowDirection.In), PinObjectAttribute(PinMode.UntilNextCall)] FreeCallback pfn_free_func, [Flow(FlowDirection.Out)] Span <T1> user_data, [Flow(FlowDirection.In)] uint num_events_in_wait_list, [Flow(FlowDirection.In)] ReadOnlySpan <nint> event_wait_list, [Flow(FlowDirection.Out)] Span <nint> @event) where T0 : unmanaged where T1 : unmanaged
 {
     // SpanOverloader
     return(thisApi.EnqueueSvmfree(command_queue, num_svm_pointers, out svm_pointers.GetPinnableReference(), pfn_free_func, out user_data.GetPinnableReference(), num_events_in_wait_list, in event_wait_list.GetPinnableReference(), out @event.GetPinnableReference()));
 }
Beispiel #6
0
 private int AddHandleFunc(int fd, int events, EventHandleCallback cb, IntPtr opaque, FreeCallback ff)
 {
     _fd     = fd;
     _event  = (EventHandleType)events;
     _cb     = cb;
     _ff     = ff;
     _opaque = opaque;
     return(0);
 }
Beispiel #7
0
 private int AddTimeoutFunc(int timeout, EventTimeoutCallback cb, IntPtr opaque, FreeCallback ff)
 {
     _active  = 1;
     _timeout = timeout;
     _tcb     = cb;
     _ff      = ff;
     _opaque  = opaque;
     return(0);
 }
Beispiel #8
0
 public unsafe int EnqueueSvmfree <T0, T1>([Flow(FlowDirection.In)] int command_queue, [Flow(FlowDirection.In)] uint num_svm_pointers, [Flow(FlowDirection.Out)] Span <T0> svm_pointers, [Flow(FlowDirection.In), Ultz.SuperInvoke.InteropServices.PinObjectAttribute(Ultz.SuperInvoke.InteropServices.PinMode.UntilNextCall)] FreeCallback pfn_free_func, [Flow(FlowDirection.Out)] Span <T1> user_data, [Flow(FlowDirection.In)] uint num_events_in_wait_list, [Flow(FlowDirection.In)] Span <IntPtr> event_wait_list, [Flow(FlowDirection.Out)] Span <IntPtr> @event) where T0 : unmanaged where T1 : unmanaged
 {
     // IntPtrOverloader
     return(EnqueueSvmfree(new IntPtr(command_queue), num_svm_pointers, svm_pointers, pfn_free_func, user_data, num_events_in_wait_list, event_wait_list, @event));
 }
Beispiel #9
0
 public Callbacks(AllocCallback allocCallback, FreeCallback freeCallback, NoMemoryCallback noMemoryCallback)
 {
     nativeCallbacks.malloc    = Marshal.GetFunctionPointerForDelegate(allocCallback);
     nativeCallbacks.free      = Marshal.GetFunctionPointerForDelegate(freeCallback);
     nativeCallbacks.no_memory = Marshal.GetFunctionPointerForDelegate(noMemoryCallback);
 }
Beispiel #10
0
 public unsafe int EnqueueSvmfree([Flow(FlowDirection.In)] int command_queue, [Flow(FlowDirection.In)] uint num_svm_pointers, [Flow(FlowDirection.Out)] void *svm_pointers, [Flow(FlowDirection.In), Ultz.SuperInvoke.InteropServices.PinObjectAttribute(Ultz.SuperInvoke.InteropServices.PinMode.UntilNextCall)] FreeCallback pfn_free_func, [Flow(FlowDirection.Out)] void *user_data, [Flow(FlowDirection.In)] uint num_events_in_wait_list, [Flow(FlowDirection.In)] IntPtr *event_wait_list, [Flow(FlowDirection.Out)] IntPtr * @event)
 {
     // IntPtrOverloader
     return(EnqueueSvmfree(new IntPtr(command_queue), num_svm_pointers, svm_pointers, pfn_free_func, user_data, num_events_in_wait_list, event_wait_list, @event));
 }
Beispiel #11
0
 public abstract int EnqueueSvmfree <T0, T1>([Flow(FlowDirection.In)] IntPtr command_queue, [Flow(FlowDirection.In)] uint num_svm_pointers, [Flow(FlowDirection.Out)] Span <T0> svm_pointers, [Flow(FlowDirection.In), Ultz.SuperInvoke.InteropServices.PinObjectAttribute(Ultz.SuperInvoke.InteropServices.PinMode.UntilNextCall)] FreeCallback pfn_free_func, [Flow(FlowDirection.Out)] Span <T1> user_data, [Flow(FlowDirection.In)] uint num_events_in_wait_list, [Flow(FlowDirection.In)] Span <IntPtr> event_wait_list, [Flow(FlowDirection.Out)] Span <IntPtr> @event) where T0 : unmanaged where T1 : unmanaged;
Beispiel #12
0
 public abstract unsafe int EnqueueSvmfree([Flow(FlowDirection.In)] IntPtr command_queue, [Flow(FlowDirection.In)] uint num_svm_pointers, [Flow(FlowDirection.Out)] void *svm_pointers, [Flow(FlowDirection.In), Ultz.SuperInvoke.InteropServices.PinObjectAttribute(Ultz.SuperInvoke.InteropServices.PinMode.UntilNextCall)] FreeCallback pfn_free_func, [Flow(FlowDirection.Out)] void *user_data, [Flow(FlowDirection.In)] uint num_events_in_wait_list, [Flow(FlowDirection.In)] IntPtr *event_wait_list, [Flow(FlowDirection.Out)] IntPtr * @event);
 public unsafe partial int EnqueueSvmfree([Flow(FlowDirection.In)] nint command_queue, [Flow(FlowDirection.In)] uint num_svm_pointers, [Flow(FlowDirection.Out)] void *svm_pointers, [Flow(FlowDirection.In), PinObjectAttribute(PinMode.UntilNextCall)] FreeCallback pfn_free_func, [Flow(FlowDirection.Out)] void *user_data, [Flow(FlowDirection.In)] uint num_events_in_wait_list, [Flow(FlowDirection.In)] in nint event_wait_list, [Flow(FlowDirection.Out)] nint * @event);
 public static unsafe int EnqueueSvmfree <T0>(this ArmSharedVirtualMemory thisApi, [Flow(FlowDirection.In)] IntPtr command_queue, [Flow(FlowDirection.In)] uint num_svm_pointers, [Flow(FlowDirection.Out)] Span <T0> svm_pointers, [Flow(FlowDirection.In), PinObjectAttribute(PinMode.UntilNextCall)] FreeCallback pfn_free_func, [Flow(FlowDirection.Out)] void *user_data, [Flow(FlowDirection.In)] uint num_events_in_wait_list, [Flow(FlowDirection.In)] IntPtr *event_wait_list, [Flow(FlowDirection.Out)] IntPtr * @event) where T0 : unmanaged
 {
     // SpanOverloader
     return(thisApi.EnqueueSvmfree(command_queue, num_svm_pointers, out svm_pointers.GetPinnableReference(), pfn_free_func, user_data, num_events_in_wait_list, event_wait_list, @event));
 }