Skip to content
Snippets Groups Projects
Commit 20dbff92 authored by Thomas Jahns's avatar Thomas Jahns :cartwheel: Committed by Sergey Kosukhin
Browse files

Rename struct.

parent 0b4aae51
No related branches found
No related tags found
2 merge requests!34Version 2.2.0,!13Consolidation with CDI-PIO (develop)
......@@ -27,7 +27,7 @@
#include "pio_util.h"
#include "dmemory.h"
typedef struct
struct fileFunnelAIO
{
struct dBuffer *fb;
struct aiocb *ctrlBlks;
......@@ -37,26 +37,26 @@ typedef struct
int activeCollectors;
int handle, fileID;
char name[];
} bFiledataPA;
};
static int
fileIDTest(void *a, void *fileID)
{
return ((bFiledataPA *) a)->fileID == (int) (intptr_t) fileID;
return ((struct fileFunnelAIO *) a)->fileID == (int) (intptr_t) fileID;
}
/***************************************************************/
static bFiledataPA *
static struct fileFunnelAIO *
initBFiledataPA(char *filename, struct cdiPioConf *conf, int nc)
{
bFiledataPA *bfd;
struct fileFunnelAIO *bfd;
size_t bufSize = conf->writeAggBufLim;
size_t aioQueueDepth = conf->aioQueueDepth;
xdebug("filename=%s, buffersize=%zu, ncollectors=%d, AIO queue depth=%zu", filename, bufSize, nc, aioQueueDepth);
bfd = (bFiledataPA *) Malloc(sizeof(*bfd) + strlen(filename) + 1);
bfd = (struct fileFunnelAIO *) Malloc(sizeof(*bfd) + strlen(filename) + 1);
strcpy(bfd->name, filename);
if ((bfd->handle = open(bfd->name, O_CREAT | O_WRONLY, 0666)) == -1) xabort("Failed to open %s", bfd->name);
......@@ -88,7 +88,7 @@ initBFiledataPA(char *filename, struct cdiPioConf *conf, int nc)
static int
destroyBFiledataPA(void *v)
{
bFiledataPA *bfd = (bFiledataPA *) v;
struct fileFunnelAIO *bfd = (struct fileFunnelAIO *) v;
const struct aiocb *ccBP[1];
int iret = 0;
struct cdiPioConf *conf = cdiPioGetConf();
......@@ -140,7 +140,7 @@ destroyBFiledataPA(void *v)
static bool
compareNamesBPA(void *v1, void *v2)
{
bFiledataPA *bfd1 = v1, *bfd2 = v2;
struct fileFunnelAIO *bfd1 = v1, *bfd2 = v2;
return !strcmp(bfd1->name, bfd2->name);
}
......@@ -148,7 +148,7 @@ compareNamesBPA(void *v1, void *v2)
/***************************************************************/
static void
writePA(bFiledataPA *bfd, size_t amount, struct cdiPioConf *conf)
writePA(struct fileFunnelAIO *bfd, size_t amount, struct cdiPioConf *conf)
{
const struct aiocb *ccBP;
size_t aioQueueDepth = conf->aioQueueDepth;
......@@ -202,7 +202,7 @@ writePA(bFiledataPA *bfd, size_t amount, struct cdiPioConf *conf)
static void
elemCheck(void *q, void *nm)
{
bFiledataPA *bfd = q;
struct fileFunnelAIO *bfd = q;
const char *name = nm;
if (!strcmp(name, bfd->name)) xabort("Filename %s has already been inserted\n", name);
......@@ -213,7 +213,7 @@ elemCheck(void *q, void *nm)
void
pioWriterAIO(void)
{
bFiledataPA *bfd;
struct fileFunnelAIO *bfd;
listSet *bibBFiledataPA;
MPI_Comm commPio = commInqCommPio();
int nProcsColl = commInqSizeColl();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment