Commit 994eb653 authored by Philip Carns's avatar Philip Carns

match aio_return() with aio_return64() wrapper


git-svn-id: https://svn.mcs.anl.gov/repos/darshan/trunk@761 3b7491f3-a168-0410-bf4b-c445ed680a29
parent 7d38e1ef
......@@ -1110,12 +1110,26 @@ ssize_t DARSHAN_DECL(aio_return64)(struct aiocb *aiocbp)
ssize_t DARSHAN_DECL(aio_return)(struct aiocb *aiocbp)
{
int ret;
double tm2;
struct darshan_aio_tracker *tmp;
int aligned_flag = 0;
MAP_OR_FAIL(aio_return);
printf("TESTING: wrapped aio_return()\n");
ret = __real_aio_return(aiocbp);
tm2 = darshan_wtime();
tmp = darshan_aio_tracker_del(aiocbp);
if(tmp)
{
if((unsigned long)aiocbp->aio_buf % darshan_mem_alignment == 0)
aligned_flag = 1;
CP_LOCK();
CP_RECORD_WRITE(ret, aiocbp->aio_fildes, aiocbp->aio_nbytes,
1, aiocbp->aio_offset, aligned_flag, 0, tmp->tm1, tm2);
CP_UNLOCK();
free(tmp);
}
return(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