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

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