Changeset 42
- Timestamp:
- 10/29/06 07:30:27
- Files:
-
- src/io_fread_shared.upc (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
src/io_fread_shared.upc
r31 r42 64 64 io_fread_shared(GULA_UNIT) 65 65 { 66 67 /* To check that this function only works for the file handle that is open for reading */68 fd = upc_all_fopen( fname,69 UPC_WRONLY | UPC_COMMON_FP, 0, NULL);70 if( fd == NULL )71 GULA_FAIL("failed to open the file");72 upc_barrier;73 74 ret = upc_all_fread_shared(fd, NULL, 0, 2, 0, sync);75 if( ret != -1 )76 GULA_FAIL("failed to prevent read from WRONLY");77 upc_barrier;78 79 if( upc_all_fclose(fd) != 0 )80 GULA_FAIL("failed to close the file");81 upc_barrier;82 83 66 /* To check this function can read arbitrary bytes from the file handle opened with 84 67 * UPC_COMMON_FP flag to the shared buffer and this function call updates the offset 85 68 * of the file pointer 86 69 */ 87 88 70 /* Random setup for size, and nmemb */ 89 71
