[PVFS2-CVS]
commit by robl in pvfs2-1/src/io/description: pvfs-request.c
CVS commit program
cvs at parl.clemson.edu
Thu Mar 3 12:31:49 EST 2005
Update of /projects/cvsroot/pvfs2-1/src/io/description
In directory parlweb:/tmp/cvs-serv2374
Modified Files:
pvfs-request.c
Log Message:
reformatted for pvfs2 coding styles
(still need copyright assignment sorted out)
Index: pvfs-request.c
===================================================================
RCS file: /projects/cvsroot/pvfs2-1/src/io/description/pvfs-request.c,v
diff -u -w -p -u -r1.16 -r1.17
--- pvfs-request.c 3 Mar 2005 17:25:35 -0000 1.16
+++ pvfs-request.c 3 Mar 2005 17:31:49 -0000 1.17
@@ -1,4 +1,3 @@
-
// Copyright (c) 2000 Walt Ligon, Clemson University, Scyld Computing Inc.
// All rights reserved. This software is licensed under GPL.
// Author: Walt Ligon
@@ -73,14 +72,20 @@ PVFS_Request PVFS_PACKED = &PINT_PACKED;
/* int PVFS_Request_extent(PVFS_Request request, PVFS_size *extent); */
-int PVFS_Request_contiguous(int32_t count, PVFS_Request oldreq,
+int PVFS_Request_contiguous(
+ int32_t count,
+ PVFS_Request oldreq,
PVFS_Request *newreq)
{
return PVFS_Request_hvector(1, count, 0, oldreq, newreq);
}
-int PVFS_Request_vector(int32_t count, int32_t blocklength,
- PVFS_offset stride, PVFS_Request oldreq, PVFS_Request *newreq)
+int PVFS_Request_vector(
+ int32_t count,
+ int32_t blocklength,
+ PVFS_offset stride,
+ PVFS_Request oldreq,
+ PVFS_Request * newreq)
{
int64_t extent;
if (oldreq == NULL)
@@ -90,9 +95,14 @@ int PVFS_Request_vector(int32_t count, i
oldreq,newreq);
}
-static int PINT_subreq(PVFS_offset offset, int32_t bsize,
- PVFS_size stride, int32_t count, PVFS_Request oldreq,
- PVFS_size oldext, PVFS_Request *newreq)
+static int PINT_subreq(
+ PVFS_offset offset,
+ int32_t bsize,
+ PVFS_size stride,
+ int32_t count,
+ PVFS_Request oldreq,
+ PVFS_size oldext,
+ PVFS_Request * newreq)
{
if (oldreq == NULL)
return PVFS_ERR_REQ;
@@ -104,9 +114,10 @@ static int PINT_subreq(PVFS_offset offse
(*newreq)->lb = offset;
(*newreq)->aggregate_size = oldreq->aggregate_size * count * bsize;
if (oldreq->aggregate_size != oldext)
- (*newreq)->num_contig_chunks = oldreq->num_contig_chunks * count * bsize;
- else if (stride != bsize * oldreq->aggregate_size &&
- stride != -(bsize * oldreq->aggregate_size))
+ (*newreq)->num_contig_chunks =
+ oldreq->num_contig_chunks * count * bsize;
+ else if (stride != bsize * oldreq->aggregate_size
+ && stride != -(bsize * oldreq->aggregate_size))
(*newreq)->num_contig_chunks = count;
else
(*newreq)->num_contig_chunks = 1;
@@ -118,8 +129,12 @@ static int PINT_subreq(PVFS_offset offse
return PVFS_SUCCESS;
}
-int PVFS_Request_hvector(int32_t count, int32_t blocklength,
- PVFS_size stride, PVFS_Request oldreq, PVFS_Request *newreq)
+int PVFS_Request_hvector(
+ int32_t count,
+ int32_t blocklength,
+ PVFS_size stride,
+ PVFS_Request oldreq,
+ PVFS_Request * newreq)
{
PVFS_size oldext;
if (oldreq == NULL)
@@ -138,8 +153,12 @@ int PVFS_Request_hvector(int32_t count,
return PVFS_SUCCESS;
}
-int PVFS_Request_indexed(int32_t count, int32_t *blocklengths,
- PVFS_size *displacements, PVFS_Request oldreq, PVFS_Request *newreq)
+int PVFS_Request_indexed(
+ int32_t count,
+ int32_t * blocklengths,
+ PVFS_size * displacements,
+ PVFS_Request oldreq,
+ PVFS_Request * newreq)
{
PINT_Request *dt;
int64_t oldext;
@@ -171,11 +190,13 @@ int PVFS_Request_indexed(int32_t count,
if ((*newreq)->sreq)
{
/* contribution of ereq handled in subreq */
- (*newreq)->num_nested_req += (*newreq)->sreq->num_nested_req + 1;
+ (*newreq)->num_nested_req +=
+ (*newreq)->sreq->num_nested_req + 1;
/* this tries to deal with non-tree request graphs */
if ((*newreq)->ereq == (*newreq)->sreq->ereq)
{
- (*newreq)->num_nested_req -= (*newreq)->ereq->num_nested_req + 1;
+ (*newreq)->num_nested_req -=
+ (*newreq)->ereq->num_nested_req + 1;
}
}
}
@@ -184,8 +205,12 @@ int PVFS_Request_indexed(int32_t count,
return PVFS_SUCCESS;
}
-int PVFS_Request_hindexed(int32_t count, int32_t *blocklengths,
- PVFS_size *displacements, PVFS_Request oldreq, PVFS_Request *newreq)
+int PVFS_Request_hindexed(
+ int32_t count,
+ int32_t * blocklengths,
+ PVFS_size * displacements,
+ PVFS_Request oldreq,
+ PVFS_Request * newreq)
{
PINT_Request *dt;
int64_t oldext;
@@ -217,11 +242,13 @@ int PVFS_Request_hindexed(int32_t count,
if ((*newreq)->sreq)
{
/* contribution of ereq handled in subreq */
- (*newreq)->num_nested_req += (*newreq)->sreq->num_nested_req + 1;
+ (*newreq)->num_nested_req +=
+ (*newreq)->sreq->num_nested_req + 1;
/* this tries to deal with non-tree request graphs */
if ((*newreq)->ereq == (*newreq)->sreq->ereq)
{
- (*newreq)->num_nested_req -= (*newreq)->ereq->num_nested_req + 1;
+ (*newreq)->num_nested_req -=
+ (*newreq)->ereq->num_nested_req + 1;
}
}
}
@@ -230,8 +257,12 @@ int PVFS_Request_hindexed(int32_t count,
return PVFS_SUCCESS;
}
-int PVFS_Request_struct(int32_t count, int32_t *blocklengths,
- PVFS_size *displacements, PVFS_Request *oldreqs, PVFS_Request *newreq)
+int PVFS_Request_struct(
+ int32_t count,
+ int32_t * blocklengths,
+ PVFS_size * displacements,
+ PVFS_Request * oldreqs,
+ PVFS_Request * newreq)
{
PINT_Request *dt;
int64_t oldext;
@@ -265,11 +296,13 @@ int PVFS_Request_struct(int32_t count, i
if ((*newreq)->sreq)
{
/* contribution of ereq handled in subreq */
- (*newreq)->num_nested_req += (*newreq)->sreq->num_nested_req + 1;
+ (*newreq)->num_nested_req +=
+ (*newreq)->sreq->num_nested_req + 1;
/* this tries to deal with non-tree request graphs */
if ((*newreq)->ereq == (*newreq)->sreq->ereq)
{
- (*newreq)->num_nested_req -= (*newreq)->ereq->num_nested_req + 1;
+ (*newreq)->num_nested_req -=
+ (*newreq)->ereq->num_nested_req + 1;
}
}
}
@@ -278,13 +311,17 @@ int PVFS_Request_struct(int32_t count, i
return PVFS_SUCCESS;
}
-int PVFS_Address(void* location, PVFS_offset *address)
+int PVFS_Address(
+ void *location,
+ PVFS_offset * address)
{
address = location;
return PVFS_SUCCESS;
}
-int PVFS_Request_extent(PVFS_Request request, PVFS_size *extent)
+int PVFS_Request_extent(
+ PVFS_Request request,
+ PVFS_size * extent)
{
if (request == NULL)
return PVFS_ERR_REQ;
@@ -292,7 +329,9 @@ int PVFS_Request_extent(PVFS_Request req
return PVFS_SUCCESS;
}
-int PVFS_Request_size(PVFS_Request request, PVFS_size *size)
+int PVFS_Request_size(
+ PVFS_Request request,
+ PVFS_size * size)
{
if (request == NULL)
return PVFS_ERR_REQ;
@@ -300,7 +339,9 @@ int PVFS_Request_size(PVFS_Request reque
return PVFS_SUCCESS;
}
-int PVFS_Request_lb(PVFS_Request request, PVFS_size *displacement)
+int PVFS_Request_lb(
+ PVFS_Request request,
+ PVFS_size * displacement)
{
if (request == NULL)
return PVFS_ERR_REQ;
@@ -308,7 +349,9 @@ int PVFS_Request_lb(PVFS_Request request
return PVFS_SUCCESS;
}
-int PVFS_Request_ub(PVFS_Request request, PVFS_size *displacement)
+int PVFS_Request_ub(
+ PVFS_Request request,
+ PVFS_size * displacement)
{
if (request == NULL)
return PVFS_ERR_REQ;
@@ -321,7 +364,8 @@ int PVFS_Request_ub(PVFS_Request request
* contiguous region of memory. A pointer to this contiguous region will
* then be passed back in the argument
*/
-int PVFS_Request_commit(PVFS_Request *reqp)
+int PVFS_Request_commit(
+ PVFS_Request * reqp)
{
PVFS_Request region = NULL;
PVFS_Request req;
@@ -366,7 +410,8 @@ int PVFS_Request_commit(PVFS_Request *re
return PVFS_SUCCESS;
}
-int PVFS_Request_free(PVFS_Request *req)
+int PVFS_Request_free(
+ PVFS_Request * req)
{
PVFS_Request reqp;
if (req == NULL)
@@ -422,26 +467,37 @@ int PVFS_Request_free(PVFS_Request *req)
}
#if 0
-int PVFS_Request_commit(PVFS_Request *request)
+int PVFS_Request_commit(
+ PVFS_Request * request)
{
if (request == NULL)
return PVFS_ERR_REQ;
return PVFS_SUCCESS;
}
-int PVFS_Request_free(PVFS_Request *request)
+int PVFS_Request_free(
+ PVFS_Request * request)
{
if (request == NULL)
return PVFS_ERR_REQ;
return PVFS_SUCCESS;
}
-int PVFS_Get_elements(PVFS_Status *status, PVFS_Request request, int *count)
+
+int PVFS_Get_elements(
+ PVFS_Status * status,
+ PVFS_Request request,
+ int *count)
{
if (request == NULL)
return PVFS_ERR_REQ;
return PVFS_SUCCESS;
}
-int PVFS_Pack_size(int incount, PVFS_Request request, PVFS_Comm comm, int *size)
+
+int PVFS_Pack_size(
+ int incount,
+ PVFS_Request request,
+ PVFS_Comm comm,
+ int *size)
{
if (request == NULL)
return PVFS_ERR_REQ;
@@ -449,3 +505,12 @@ int PVFS_Pack_size(int incount, PVFS_Req
return PVFS_SUCCESS;
}
#endif
+
+/*
+ * Local variables:
+ * c-indent-level: 4
+ * c-basic-offset: 4
+ * End:
+ *
+ * vim: ts=8 sts=4 sw=4 expandtab
+ */
More information about the PVFS2-CVS
mailing list