[PVFS2-CVS] commit by neill in pvfs2/src/io/flow: flow.c flow.h

CVS commit program cvs at parl.clemson.edu
Mon Feb 23 14:21:12 EST 2004


Update of /projects/cvsroot/pvfs2/src/io/flow
In directory parlweb:/tmp/cvs-serv32058/src/io/flow

Modified Files:
	flow.c flow.h 
Log Message:
- make flow_mutex a pointer to play nicely with gen_mutex_destroy


Index: flow.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/io/flow/flow.c,v
diff -p -u -r1.34 -r1.35
--- flow.c	23 Feb 2004 18:22:47 -0000	1.34
+++ flow.c	23 Feb 2004 19:21:12 -0000	1.35
@@ -238,7 +238,6 @@ int PINT_flow_finalize(void)
     return (0);
 }
 
-
 /* PINT_flow_alloc()
  * 
  * Allocates a new flow descriptor and sets the source and destination
@@ -277,7 +276,8 @@ void PINT_flow_reset(flow_descriptor * f
     flow_d->aggregate_size = -1;
     flow_d->state = FLOW_INITIAL;
     flow_d->type = FLOWPROTO_DEFAULT;
-    gen_mutex_init(&flow_d->flow_mutex);
+    flow_d->flow_mutex = gen_mutex_build();
+    assert(flow_d->flow_mutex);
 
     return;
 }
@@ -288,9 +288,10 @@ void PINT_flow_reset(flow_descriptor * f
  *
  * no return value
  */
-void PINT_flow_free(flow_descriptor * flow_d)
+void PINT_flow_free(flow_descriptor *flow_d)
 {
-    gen_mutex_destroy(&flow_d->flow_mutex);
+    gen_mutex_destroy(flow_d->flow_mutex);
+
     free(flow_d);
     return;
 }

Index: flow.h
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/io/flow/flow.h,v
diff -p -u -r1.26 -r1.27
--- flow.h	23 Feb 2004 18:22:47 -0000	1.26
+++ flow.h	23 Feb 2004 19:21:12 -0000	1.27
@@ -123,7 +123,7 @@ struct flow_descriptor
 	/***********************************************************/
     /* fields reserved strictly for internal use */
 
-    gen_mutex_t flow_mutex;
+    gen_mutex_t *flow_mutex;
     int flowproto_id;		/* identifies which protocol owns this */
     void *flow_protocol_data;	/* used by flow protocols */
     /* called upon completion before callback */



More information about the PVFS2-CVS mailing list