public static SafeTaskHandle FileWrite( dsn_handle_t hFile, byte[] buffer, int count, ulong offset, TaskCode callbackCode, Clientlet callbackOwner, AioHandler callback, int hash = 0 ) { var idx = GlobalInterOpLookupTable.Put(callback); var task = Native.dsn_file_create_aio_task(callbackCode, _c_aio_handler_holder, (IntPtr)idx, hash, callbackOwner?.tracker() ?? IntPtr.Zero); Native.dsn_file_write(hFile, buffer, count, offset, task); return(new SafeTaskHandle(task, idx)); }
public static dsn_task_t FileWrite( dsn_handle_t hFile, byte[] buffer, int count, UInt64 offset, TaskCode callbackCode, Servicelet callbackOwner, AioHandler callback, int hash = 0 ) { int idx = GlobalInterOpLookupTable.Put(callback); dsn_task_t task = Native.dsn_file_create_aio_task(callbackCode, _c_aio_handler_holder, (IntPtr)idx, hash); Native.dsn_file_write(hFile, buffer, count, offset, task, callbackOwner != null ? callbackOwner.tracker() : IntPtr.Zero); return(task); }
public extern static void dsn_semaphore_signal(dsn_handle_t s, int count);
public extern static void dsn_rwlock_nr_unlock_write(dsn_handle_t l);
public extern static void dsn_rwlock_nr_destroy(dsn_handle_t l);
public extern static bool dsn_exlock_try_lock(dsn_handle_t l);
public static extern void dsn_file_write(dsn_handle_t file, byte[] buffer, int count, UInt64 offset, dsn_task_t cb);
public static extern bool dsn_semaphore_wait_timeout(dsn_handle_t s, int timeout_milliseconds);
public static ErrorCode FileClose(dsn_handle_t file) { var err = Native.dsn_file_close(file); return new ErrorCode(err); }
public extern static void dsn_file_write(dsn_handle_t file, byte[] buffer, int count, UInt64 offset, dsn_task_t cb, dsn_task_tracker_t tracker);
public extern static void dsn_rwlock_nr_lock_write(dsn_handle_t l);
public extern static void dsn_rwlock_nr_lock_read(dsn_handle_t l);
public extern static void dsn_exlock_lock(dsn_handle_t l);
public static extern void dsn_file_read(dsn_handle_t file, byte[] buffer, int count, UInt64 offset, dsn_task_t cb);
public static extern void dsn_rwlock_nr_lock_write(dsn_handle_t l);
public extern static bool dsn_semaphore_wait_timeout(dsn_handle_t s, int timeout_milliseconds);
public extern static void dsn_file_write(dsn_handle_t file, byte[] buffer, int count, UInt64 offset, dsn_task_t cb);
public static ErrorCode FileClose(dsn_handle_t file) { int err = Native.dsn_file_close(file); return(new ErrorCode(err)); }
public static extern void dsn_rwlock_nr_lock_read(dsn_handle_t l);
public static extern void dsn_exlock_destroy(dsn_handle_t l);
public static extern dsn_error_t dsn_file_close(dsn_handle_t file);
public static extern bool dsn_exlock_try_lock(dsn_handle_t l);
public extern static void dsn_exlock_destroy(dsn_handle_t l);
public static extern void dsn_exlock_unlock(dsn_handle_t l);
public extern static void dsn_exlock_unlock(dsn_handle_t l);
public static extern void dsn_rwlock_nr_destroy(dsn_handle_t l);
public extern static void dsn_rwlock_nr_unlock_read(dsn_handle_t l);
public static extern void dsn_rwlock_nr_unlock_read(dsn_handle_t l);
public extern static void dsn_semaphore_destroy(dsn_handle_t s);
public static extern void dsn_rwlock_nr_unlock_write(dsn_handle_t l);
public extern static void dsn_semaphore_wait(dsn_handle_t s);
public static extern void dsn_semaphore_destroy(dsn_handle_t s);
public extern static dsn_error_t dsn_file_close(dsn_handle_t file);
public static extern void dsn_semaphore_signal(dsn_handle_t s, int count);
public static SafeTaskHandle FileRead( dsn_handle_t hFile, byte[] buffer, int count, UInt64 offset, TaskCode callbackCode, Clientlet callbackOwner, AioHandler callback, int hash = 0 ) { int idx = GlobalInterOpLookupTable.Put(callback); dsn_task_t task = Native.dsn_file_create_aio_task(callbackCode, _c_aio_handler_holder, (IntPtr)idx, hash, callbackOwner != null ? callbackOwner.tracker() : IntPtr.Zero); Native.dsn_file_read(hFile, buffer, count, offset, task); return new SafeTaskHandle(task, idx); }
public static extern void dsn_semaphore_wait(dsn_handle_t s);
public static SafeTaskHandle FileWrite( dsn_handle_t hFile, byte[] buffer, int count, ulong offset, TaskCode callbackCode, Clientlet callbackOwner, AioHandler callback, int hash = 0 ) { var idx = GlobalInterOpLookupTable.Put(callback); var task = Native.dsn_file_create_aio_task(callbackCode, _c_aio_handler_holder, (IntPtr)idx, hash, callbackOwner?.tracker() ?? IntPtr.Zero); Native.dsn_file_write(hFile, buffer, count, offset, task); return new SafeTaskHandle(task, idx); }
public static extern void dsn_exlock_lock(dsn_handle_t l);