Пример #1
0
        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));
        }
Пример #2
0
        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);
        }
Пример #3
0
 public extern static void         dsn_semaphore_signal(dsn_handle_t s, int count);
Пример #4
0
 public extern static void         dsn_rwlock_nr_unlock_write(dsn_handle_t l);
Пример #5
0
 public extern static void         dsn_rwlock_nr_destroy(dsn_handle_t l);
Пример #6
0
 public extern static bool         dsn_exlock_try_lock(dsn_handle_t l);
Пример #7
0
 public static extern void         dsn_file_write(dsn_handle_t file, byte[] buffer, int count, UInt64 offset, dsn_task_t cb);
Пример #8
0
 public static extern bool         dsn_semaphore_wait_timeout(dsn_handle_t s, int timeout_milliseconds);
Пример #9
0
 public static ErrorCode FileClose(dsn_handle_t file)
 {
     var err = Native.dsn_file_close(file);
     return new ErrorCode(err);
 }
Пример #10
0
 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);
Пример #11
0
 public extern static void         dsn_rwlock_nr_lock_write(dsn_handle_t l);
Пример #12
0
 public extern static void         dsn_rwlock_nr_lock_read(dsn_handle_t l);
Пример #13
0
 public extern static void         dsn_exlock_lock(dsn_handle_t l);
Пример #14
0
 public static extern void         dsn_file_read(dsn_handle_t file, byte[] buffer, int count, UInt64 offset, dsn_task_t cb);
Пример #15
0
 public static extern void         dsn_rwlock_nr_lock_write(dsn_handle_t l);
Пример #16
0
 public extern static bool         dsn_semaphore_wait_timeout(dsn_handle_t s, int timeout_milliseconds);
Пример #17
0
 public extern static void         dsn_file_write(dsn_handle_t file, byte[] buffer, int count, UInt64 offset, dsn_task_t cb);
Пример #18
0
        public static ErrorCode FileClose(dsn_handle_t file)
        {
            int err = Native.dsn_file_close(file);

            return(new ErrorCode(err));
        }
Пример #19
0
 public static extern void         dsn_rwlock_nr_lock_read(dsn_handle_t l);
Пример #20
0
 public static extern void         dsn_exlock_destroy(dsn_handle_t l);
Пример #21
0
 public static extern dsn_error_t  dsn_file_close(dsn_handle_t file);
Пример #22
0
 public static extern bool         dsn_exlock_try_lock(dsn_handle_t l);
Пример #23
0
 public extern static void         dsn_exlock_destroy(dsn_handle_t l);
Пример #24
0
 public static extern void         dsn_exlock_unlock(dsn_handle_t l);
Пример #25
0
 public extern static void         dsn_exlock_unlock(dsn_handle_t l);
Пример #26
0
 public static extern void         dsn_rwlock_nr_destroy(dsn_handle_t l);
Пример #27
0
 public extern static void         dsn_rwlock_nr_unlock_read(dsn_handle_t l);
Пример #28
0
 public static extern void         dsn_rwlock_nr_unlock_read(dsn_handle_t l);
Пример #29
0
 public extern static void         dsn_semaphore_destroy(dsn_handle_t s);
Пример #30
0
 public static extern void         dsn_rwlock_nr_unlock_write(dsn_handle_t l);
Пример #31
0
 public extern static void         dsn_semaphore_wait(dsn_handle_t s);
Пример #32
0
 public static extern void         dsn_semaphore_destroy(dsn_handle_t s);
Пример #33
0
 public extern static dsn_error_t  dsn_file_close(dsn_handle_t file);
Пример #34
0
 public static extern void         dsn_semaphore_signal(dsn_handle_t s, int count);
Пример #35
0
 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);
 }
Пример #36
0
 public static extern void         dsn_semaphore_wait(dsn_handle_t s);
Пример #37
0
 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);
 }
Пример #38
0
 public static extern void         dsn_exlock_lock(dsn_handle_t l);