瀏覽代碼

Remove spurious async parameter of synchronous read/write functions

Samuel Thibault 10 年之前
父節點
當前提交
bcd5fb6e5f

+ 2 - 2
include/starpu_disk.h

@@ -26,8 +26,8 @@ struct starpu_disk_ops {
 	 void    (*free)   (void *base, void *obj, size_t size);
 	 void *  (*open)   (void *base, void *pos, size_t size);     /* open an existing file */
 	 void    (*close)  (void *base, void *obj, size_t size);
-	 int     (*read)   (void *base, void *obj, void *buf, off_t offset, size_t size, void * async); 
-	 int     (*write)  (void *base, void *obj, const void *buf, off_t offset, size_t size, void * async); 
+	 int     (*read)   (void *base, void *obj, void *buf, off_t offset, size_t size);
+	 int     (*write)  (void *base, void *obj, const void *buf, off_t offset, size_t size);
 	 int     (*async_write)  (void *base, void *obj, void *buf, off_t offset, size_t size, void * async); 
 	 int     (*async_read)   (void *base, void *obj, void *buf, off_t offset, size_t size, void * async); 
 	/* readv, writev, read2d, write2d, etc. */

+ 2 - 2
src/core/disk.c

@@ -144,7 +144,7 @@ _starpu_disk_read(unsigned src_node, unsigned dst_node STARPU_ATTRIBUTE_UNUSED,
 	/* asynchronous request failed or synchronous request is asked */	
 	if (async_channel == NULL || values < 0)
 	{
-		disk_register_list[pos]->functions->read(disk_register_list[pos]->base, obj, buf, offset, size, async_channel);
+		disk_register_list[pos]->functions->read(disk_register_list[pos]->base, obj, buf, offset, size);
 		return 0;
 	}
 	return -EAGAIN;
@@ -185,7 +185,7 @@ _starpu_disk_write(unsigned src_node STARPU_ATTRIBUTE_UNUSED, unsigned dst_node,
         /* asynchronous request failed or synchronous request is asked */
         if (async_channel == NULL || values < 0)
         {
-		disk_register_list[pos]->functions->write(disk_register_list[pos]->base, obj, buf, offset, size, async_channel);
+		disk_register_list[pos]->functions->write(disk_register_list[pos]->base, obj, buf, offset, size);
         	return 0;
         }
         return -EAGAIN;

+ 2 - 2
src/core/disk_ops/disk_leveldb.cpp

@@ -122,7 +122,7 @@ starpu_leveldb_close (void *base STARPU_ATTRIBUTE_UNUSED, void *obj, size_t size
 /* in the leveldb, we are obliged to read and to write the entire data 
  * so, we have to use buffers to have offset and size options */
 static int 
-starpu_leveldb_read (void *base, void *obj, void *buf, off_t offset, size_t size, void * async_channel STARPU_ATTRIBUTE_UNUSED)
+starpu_leveldb_read (void *base, void *obj, void *buf, off_t offset, size_t size)
 {
 	struct starpu_leveldb_obj * tmp = (struct starpu_leveldb_obj *) obj;
 	struct starpu_leveldb_base * base_tmp = (struct starpu_leveldb_base *) base;	
@@ -158,7 +158,7 @@ starpu_leveldb_full_read(unsigned node, void *base, void * obj, void ** ptr, siz
 
 /* write on the memory disk */
 static int 
-starpu_leveldb_write (void *base, void *obj, const void *buf, off_t offset, size_t size, void * async_channel)
+starpu_leveldb_write (void *base, void *obj, const void *buf, off_t offset, size_t size)
 {
         struct starpu_leveldb_obj * tmp = (struct starpu_leveldb_obj *) obj;
         struct starpu_leveldb_base * base_tmp = (struct starpu_leveldb_base *) base;

+ 2 - 2
src/core/disk_ops/disk_stdio.c

@@ -179,7 +179,7 @@ static void starpu_stdio_close(void *base STARPU_ATTRIBUTE_UNUSED, void *obj, si
 }
 
 /* read the memory disk */
-static int starpu_stdio_read(void *base STARPU_ATTRIBUTE_UNUSED, void *obj, void *buf, off_t offset, size_t size, void * async_channel STARPU_ATTRIBUTE_UNUSED)
+static int starpu_stdio_read(void *base STARPU_ATTRIBUTE_UNUSED, void *obj, void *buf, off_t offset, size_t size)
 {
 	struct starpu_stdio_obj * tmp = (struct starpu_stdio_obj *) obj;
 
@@ -206,7 +206,7 @@ static int starpu_stdio_full_read(unsigned node, void *base STARPU_ATTRIBUTE_UNU
 }
 
 /* write on the memory disk */
-static int starpu_stdio_write(void *base STARPU_ATTRIBUTE_UNUSED, void *obj, const void *buf, off_t offset, size_t size, void * async_channel STARPU_ATTRIBUTE_UNUSED)
+static int starpu_stdio_write(void *base STARPU_ATTRIBUTE_UNUSED, void *obj, const void *buf, off_t offset, size_t size)
 {
 	struct starpu_stdio_obj * tmp = (struct starpu_stdio_obj *) obj;
 

+ 4 - 4
src/core/disk_ops/disk_unistd_o_direct.c

@@ -56,25 +56,25 @@ starpu_unistd_o_direct_open (void *base, void *pos, size_t size)
 
 /* read the memory disk */
 static int 
-starpu_unistd_o_direct_read (void *base STARPU_ATTRIBUTE_UNUSED, void *obj, void *buf, off_t offset, size_t size, void * async_channel)
+starpu_unistd_o_direct_read (void *base STARPU_ATTRIBUTE_UNUSED, void *obj, void *buf, off_t offset, size_t size)
 {
 	STARPU_ASSERT_MSG((size % getpagesize()) == 0, "You can only read a multiple of page size %u Bytes (Here %u)", getpagesize(), (int) size);
 
 	STARPU_ASSERT_MSG((((uintptr_t) buf) % getpagesize()) == 0, "You have to use starpu_malloc function");
 
-	return starpu_unistd_global_read (base, obj, buf, offset, size, async_channel);
+	return starpu_unistd_global_read (base, obj, buf, offset, size);
 }
 
 
 /* write on the memory disk */
 static int 
-starpu_unistd_o_direct_write (void *base STARPU_ATTRIBUTE_UNUSED, void *obj, const void *buf, off_t offset, size_t size, void * async_channel)
+starpu_unistd_o_direct_write (void *base STARPU_ATTRIBUTE_UNUSED, void *obj, const void *buf, off_t offset, size_t size)
 {
 	STARPU_ASSERT_MSG((size % getpagesize()) == 0, "You can only write a multiple of page size %u Bytes (Here %u)", getpagesize(), (int) size);
 
 	STARPU_ASSERT_MSG((((uintptr_t)buf) % getpagesize()) == 0, "You have to use starpu_malloc function");
 
-	return starpu_unistd_global_write (base, obj, buf, offset, size, async_channel);
+	return starpu_unistd_global_write (base, obj, buf, offset, size);
 }
 
 

+ 2 - 2
src/core/disk_ops/unistd/disk_unistd_global.c

@@ -169,7 +169,7 @@ starpu_unistd_global_close (void *base STARPU_ATTRIBUTE_UNUSED, void *obj, size_
 
 /* read the memory disk */
  int 
-starpu_unistd_global_read (void *base STARPU_ATTRIBUTE_UNUSED, void *obj, void *buf, off_t offset, size_t size, void * async_channel STARPU_ATTRIBUTE_UNUSED)
+starpu_unistd_global_read (void *base STARPU_ATTRIBUTE_UNUSED, void *obj, void *buf, off_t offset, size_t size)
 {
 	struct starpu_unistd_global_obj * tmp = (struct starpu_unistd_global_obj *) obj;
 
@@ -222,7 +222,7 @@ starpu_unistd_global_full_read(unsigned node, void *base STARPU_ATTRIBUTE_UNUSED
 
 /* write on the memory disk */
  int 
-starpu_unistd_global_write (void *base STARPU_ATTRIBUTE_UNUSED, void *obj, const void *buf, off_t offset, size_t size, void * async_channel STARPU_ATTRIBUTE_UNUSED)
+starpu_unistd_global_write (void *base STARPU_ATTRIBUTE_UNUSED, void *obj, const void *buf, off_t offset, size_t size)
 {
 	struct starpu_unistd_global_obj * tmp = (struct starpu_unistd_global_obj *) obj;
 

+ 2 - 2
src/core/disk_ops/unistd/disk_unistd_global.h

@@ -35,8 +35,8 @@ void * starpu_unistd_global_alloc (struct starpu_unistd_global_obj * obj, void *
 void starpu_unistd_global_free (void *base STARPU_ATTRIBUTE_UNUSED, void *obj, size_t size STARPU_ATTRIBUTE_UNUSED);
 void * starpu_unistd_global_open (struct starpu_unistd_global_obj * obj, void *base, void *pos, size_t size);
 void starpu_unistd_global_close (void *base STARPU_ATTRIBUTE_UNUSED, void *obj, size_t size STARPU_ATTRIBUTE_UNUSED);
-int starpu_unistd_global_read (void *base STARPU_ATTRIBUTE_UNUSED, void *obj, void *buf, off_t offset, size_t size, void * async_channel);
-int starpu_unistd_global_write (void *base STARPU_ATTRIBUTE_UNUSED, void *obj, const void *buf, off_t offset, size_t size, void * async_channel);
+int starpu_unistd_global_read (void *base STARPU_ATTRIBUTE_UNUSED, void *obj, void *buf, off_t offset, size_t size);
+int starpu_unistd_global_write (void *base STARPU_ATTRIBUTE_UNUSED, void *obj, const void *buf, off_t offset, size_t size);
 void * starpu_unistd_global_plug (void *parameter);
 void starpu_unistd_global_unplug (void *base);
 int get_unistd_global_bandwidth_between_disk_and_main_ram(unsigned node);