Commit 7a522066 authored by Philip Carns's avatar Philip Carns
Browse files

fill in remaining aio_read and aio_write functions


git-svn-id: https://svn.mcs.anl.gov/repos/darshan/trunk@763 3b7491f3-a168-0410-bf4b-c445ed680a29
parent bb5fac5f
...@@ -1056,8 +1056,16 @@ ssize_t DARSHAN_DECL(aio_return64)(struct aiocb *aiocbp) ...@@ -1056,8 +1056,16 @@ ssize_t DARSHAN_DECL(aio_return64)(struct aiocb *aiocbp)
if((unsigned long)aiocbp->aio_buf % darshan_mem_alignment == 0) if((unsigned long)aiocbp->aio_buf % darshan_mem_alignment == 0)
aligned_flag = 1; aligned_flag = 1;
CP_LOCK(); CP_LOCK();
CP_RECORD_WRITE(ret, aiocbp->aio_fildes, aiocbp->aio_nbytes, if(aiocbp->aio_lio_opcode == LIO_WRITE)
1, aiocbp->aio_offset, aligned_flag, 0, tmp->tm1, tm2); {
CP_RECORD_WRITE(ret, aiocbp->aio_fildes, aiocbp->aio_nbytes,
1, aiocbp->aio_offset, aligned_flag, 0, tmp->tm1, tm2);
}
if(aiocbp->aio_lio_opcode == LIO_READ)
{
CP_RECORD_READ(ret, aiocbp->aio_fildes, aiocbp->aio_nbytes,
1, aiocbp->aio_offset, aligned_flag, 0, tmp->tm1, tm2);
}
CP_UNLOCK(); CP_UNLOCK();
free(tmp); free(tmp);
} }
...@@ -1139,9 +1147,9 @@ int DARSHAN_DECL(aio_write)(struct aiocb *aiocbp) ...@@ -1139,9 +1147,9 @@ int DARSHAN_DECL(aio_write)(struct aiocb *aiocbp)
MAP_OR_FAIL(aio_write); MAP_OR_FAIL(aio_write);
printf("TESTING: wrapped aio_write()\n");
ret = __real_aio_write(aiocbp); ret = __real_aio_write(aiocbp);
if(ret == 0)
darshan_aio_tracker_add(aiocbp);
return(ret); return(ret);
} }
...@@ -1152,9 +1160,9 @@ int DARSHAN_DECL(aio_read64)(struct aiocb *aiocbp) ...@@ -1152,9 +1160,9 @@ int DARSHAN_DECL(aio_read64)(struct aiocb *aiocbp)
MAP_OR_FAIL(aio_read64); MAP_OR_FAIL(aio_read64);
printf("TESTING: wrapped aio_read64()\n");
ret = __real_aio_read64(aiocbp); ret = __real_aio_read64(aiocbp);
if(ret == 0)
darshan_aio_tracker_add(aiocbp);
return(ret); return(ret);
} }
...@@ -1165,14 +1173,13 @@ int DARSHAN_DECL(aio_read)(struct aiocb *aiocbp) ...@@ -1165,14 +1173,13 @@ int DARSHAN_DECL(aio_read)(struct aiocb *aiocbp)
MAP_OR_FAIL(aio_read); MAP_OR_FAIL(aio_read);
printf("TESTING: wrapped aio_read()\n");
ret = __real_aio_read(aiocbp); ret = __real_aio_read(aiocbp);
if(ret == 0)
darshan_aio_tracker_add(aiocbp);
return(ret); return(ret);
} }
int DARSHAN_DECL(fseek)(FILE *stream, long offset, int whence) int DARSHAN_DECL(fseek)(FILE *stream, long offset, int whence)
{ {
int ret; int ret;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment