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

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