Index: trunk/kernel/devices/dev_ioc.h
===================================================================
--- trunk/kernel/devices/dev_ioc.h	(revision 647)
+++ trunk/kernel/devices/dev_ioc.h	(revision 657)
@@ -2,5 +2,5 @@
  * dev_ioc.h - IOC (Block Device Controler) generic device API definition.
  * 
- * Author  Alain Greiner    (2016,2017,2018,2019)
+ * Author  Alain Greiner    (2016,2017,2018,2019,2020)
  *
  * Copyright (c) UPMC Sorbonne Universites
@@ -45,5 +45,5 @@
  * - SYNC_WRITE : move blocks from memory to device, with a busy waiting policy.
  *
- * For the he READ or WRITE operations, the client thread is descheduled, and the work
+ * For the READ or WRITE operations, the client thread is descheduled, and the work
  * is done by the server thread associated to the IOC device:
  * The client thread calls the dev_ioc_move_data() kernel functions that (i) registers
@@ -93,5 +93,5 @@
 
 /******************************************************************************************
- * This defines the (implementation independant)  command passed to the driver.
+ * This structure defines the IOC command for all drivers implementing the IOC device.
  *****************************************************************************************/
 
@@ -103,5 +103,5 @@
     IOC_SYNC_WRITE = 3,
 }
-cmd_type_t;
+ioc_cmd_type_t;
 
 typedef struct ioc_command_s
@@ -111,5 +111,5 @@
     uint32_t    lba;        /*! first block index                                        */
     uint32_t    count;      /*! number of blocks                                         */
-    xptr_t      buf_xp;     /*! extended pointer on memory buffer                        */
+    xptr_t      buf_xp;     /*! extended pointer on kernel memory buffer                 */
     uint32_t    error;      /*! operation status (0 if success)                          */
 }
@@ -122,5 +122,5 @@
  * @ return pointer on string.
  *****************************************************************************************/
-char * dev_ioc_cmd_str( cmd_type_t cmd );
+char * dev_ioc_cmd_str( ioc_cmd_type_t cmd );
 
 /******************************************************************************************
@@ -138,23 +138,74 @@
 
 /******************************************************************************************
- * This blocking function moves <count> contiguous blocks of data between the block device
- * starting from block defined by the <lba> argument and a kernel memory buffer, defined
- * by the <buffer_xp> argument. The transfer direction and mode are defined by the 
- * <cmd_type> argument. The request is always registered in the calling thread descriptor.
- * - In synchronous mode, the calling thread is not descheduled, and directly calls the
- *   IOC driver, polling the IOC status to detect transfer completion.
- * - In asynchronous mode, the calling thread blocks and deschedules, and the IOC driver
- *   is called by the server thread associated to the IOC device.
- ******************************************************************************************
- * @ cmd_type  : IOC_READ / IOC_WRITE / IOC_SYNC_READ / IOC_SYN_WRITE.
- * @ buffer_xp : extended pointer on kernel buffer in memory (must be block aligned).
- * @ lba       : first block index on device.
- * @ count     : number of blocks to transfer.
- * @ returns 0 if success / returns -1 if error.
- *****************************************************************************************/
-error_t dev_ioc_move_data( uint32_t  cmd_type,
-                           xptr_t    buffer_xp,
+ * This blocking function register an asynchronous READ request : move <count> contiguous
+ * blocks from the block device, starting from block defined by the <lba> argument, to a
+ * kernel buffer defined by the <buffer_xp> argument.
+ * It register the request in the client thread descriptor, it register the client thread
+ * in the IOC device queue, it blocks on the THREAD_BLOCKED_IO condition, and deschedules.
+ * It will be reactivated by the DEV server thread when the transfer is completed.
+ * It can be executed by a thread running in any cluster.
+ ******************************************************************************************
+ * @ buffer_xp : extended pointer on kernel buffer in memory (must be block aligned).
+ * @ lba       : first block index on device.
+ * @ count     : number of blocks to transfer.
+ * @ returns 0 if success / returns -1 if error.
+ *****************************************************************************************/
+error_t dev_ioc_read( xptr_t    buffer_xp,
+                      uint32_t  lba,
+                      uint32_t  count );
+
+/******************************************************************************************
+ * This blocking function register an asynchronous WRITE request : move <count> contiguous
+ * blocks from a kernel buffer defined by the <buffer_xp> argument to the block device,
+ * starting from block defined by the <lba> argument.
+ * It register the request in the client thread descriptor, it register the client thread
+ * in the IOC device queue, it blocks on the THREAD_BLOCKED_IO condition, and deschedules.
+ * It will be reactivated by the DEV server thread when the transfer is completed.
+ * It can be executed by a thread running in any cluster.
+ ******************************************************************************************
+ * @ buffer_xp : extended pointer on kernel buffer in memory (must be block aligned).
+ * @ lba       : first block index on device.
+ * @ count     : number of blocks to transfer.
+ * @ returns 0 if success / returns -1 if error.
+ *****************************************************************************************/
+error_t dev_ioc_write( xptr_t    buffer_xp,
+                       uint32_t  lba,
+                       uint32_t  count );
+
+/******************************************************************************************
+ * This blocking function executes a synchronous SYNC_READ request : it moves <count>
+ * contiguous blocks of data from the block device, starting from block defined by the
+ * <lba> argument to a kernel memory buffer, defined by the <buffer_xp> argument. 
+ * The request is registered in the calling thread descriptor, but the client thread calls
+ * directly the driver cmd function, that is also a blocking function returning only
+ * when the transfer is completed.
+ * It can be executed by a thread running in any cluster.
+ ******************************************************************************************
+ * @ buffer_xp : extended pointer on kernel buffer in memory (must be block aligned).
+ * @ lba       : first block index on device.
+ * @ count     : number of blocks to transfer.
+ * @ returns 0 if success / returns -1 if error.
+ *****************************************************************************************/
+error_t dev_ioc_sync_read( xptr_t    buffer_xp,
                            uint32_t  lba,
                            uint32_t  count );
 
+/******************************************************************************************
+ * This blocking function executes a synchronous SYNC_WRITE request : it moves <count>
+ * contiguous blocks of data from a kernel memory buffer, defined by the <buffer_xp>
+ * argument to the block device, starting from block defined by the <lba> argument. 
+ * The request is registered in the calling thread descriptor, but the client thread calls
+ * directly the driver cmd() function, that is also a blocking function returning only
+ * when the transfer is completed.
+ * It can be executed by a thread running in any cluster.
+ ******************************************************************************************
+ * @ buffer_xp : extended pointer on kernel buffer in memory (must be block aligned).
+ * @ lba       : first block index on device.
+ * @ count     : number of blocks to transfer.
+ * @ returns 0 if success / returns -1 if error.
+ *****************************************************************************************/
+error_t dev_ioc_sync_write( xptr_t    buffer_xp,
+                            uint32_t  lba,
+                            uint32_t  count );
+
 #endif	/* _DEV_IOC_H */
