Commit 3e2b9b0f authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Rename idx to fileID which it really is.

parent bce9a421
...@@ -44,7 +44,6 @@ typedef struct ...@@ -44,7 +44,6 @@ typedef struct
char *name; char *name;
size_t size; size_t size;
struct dBuffer *fb; struct dBuffer *fb;
int handle;
struct aiocb *ctrlBlks; struct aiocb *ctrlBlks;
off_t offset; off_t offset;
int currOpIndex; int currOpIndex;
...@@ -52,13 +51,13 @@ typedef struct ...@@ -52,13 +51,13 @@ typedef struct
int prefIndex; int prefIndex;
bool finished; bool finished;
bool *nfinished; bool *nfinished;
int idx; int handle, fileID;
} bFiledataPA; } bFiledataPA;
static int static int
idxTest(void *a, void *idx) fileIDTest(void *a, void *fileID)
{ {
return ((bFiledataPA *)a)->idx == (int)(intptr_t)idx; return ((bFiledataPA *)a)->fileID == (int)(intptr_t)fileID;
} }
int nPrefStreams = 4; int nPrefStreams = 4;
...@@ -313,7 +312,7 @@ void pioWriterAIO(void) ...@@ -313,7 +312,7 @@ void pioWriterAIO(void)
command2charP [ rtag->command ], filename, command2charP [ rtag->command ], filename,
buffersize, amount ); buffersize, amount );
if (!(bfd = queueGet(bibBFiledataPA, idxTest, if (!(bfd = queueGet(bibBFiledataPA, fileIDTest,
(void *)(intptr_t)rtag->id))) (void *)(intptr_t)rtag->id)))
{ {
queueForeach(bibBFiledataPA, elemCheck, filename); queueForeach(bibBFiledataPA, elemCheck, filename);
...@@ -339,7 +338,7 @@ void pioWriterAIO(void) ...@@ -339,7 +338,7 @@ void pioWriterAIO(void)
case IO_Send_buffer: case IO_Send_buffer:
if (!(bfd = queueGet(bibBFiledataPA, idxTest, if (!(bfd = queueGet(bibBFiledataPA, fileIDTest,
(void *)(intptr_t)rtag->id))) (void *)(intptr_t)rtag->id)))
xabort("fileID=%d is not in queue", rtag->id); xabort("fileID=%d is not in queue", rtag->id);
...@@ -360,7 +359,7 @@ void pioWriterAIO(void) ...@@ -360,7 +359,7 @@ void pioWriterAIO(void)
case IO_Close_file: case IO_Close_file:
if (!(bfd = queueGet(bibBFiledataPA, idxTest, if (!(bfd = queueGet(bibBFiledataPA, fileIDTest,
(void *)(intptr_t)rtag->id))) (void *)(intptr_t)rtag->id)))
xabort("fileID=%d is not in queue", rtag->id ); xabort("fileID=%d is not in queue", rtag->id );
...@@ -391,7 +390,7 @@ void pioWriterAIO(void) ...@@ -391,7 +390,7 @@ void pioWriterAIO(void)
if ( bfd->finished ) if ( bfd->finished )
{ {
xdebug ( "all are finished with file %d, delete node", rtag->id ); xdebug ( "all are finished with file %d, delete node", rtag->id );
queueDelNode(bibBFiledataPA, idxTest, queueDelNode(bibBFiledataPA, fileIDTest,
(void *)(intptr_t)rtag->id); (void *)(intptr_t)rtag->id);
} }
break; break;
......
Supports Markdown
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