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

CVS commit program cvs at parl.clemson.edu
Tue Feb 24 20:16:58 EST 2004


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

Modified Files:
	flow.c flowproto-support.h 
Log Message:
started stubbing in hooks for cancelling previously posted flows


Index: flow.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/io/flow/flow.c,v
diff -p -u -r1.35 -r1.36
--- flow.c	23 Feb 2004 19:21:12 -0000	1.35
+++ flow.c	25 Feb 2004 01:16:58 -0000	1.36
@@ -366,6 +366,7 @@ int PINT_flow_post(flow_descriptor * flo
     flow_d->release = flow_release;
 
     /* post the flow to the flow protocol level */
+    flow_d->flowproto_id = flowproto_id;
     ret = active_flowproto_table[flowproto_id]->flowproto_post(flow_d);
     gen_mutex_unlock(&interface_mutex);
     return (ret);
@@ -380,8 +381,24 @@ int PINT_flow_post(flow_descriptor * flo
  */
 int PINT_flow_cancel(flow_descriptor * flow_d)
 {
-    gossip_lerr("function not implemented.\n");
-    return (-ENOSYS);
+    int ret;
+
+    gen_mutex_lock(&interface_mutex);
+    assert(flow_d);
+    assert(flow_d->flowproto_id >= 0);
+
+    if(active_flowproto_table[flow_d->flowproto_id]->flowproto_cancel)
+    {
+	ret =
+	active_flowproto_table[flow_d->flowproto_id]->flowproto_cancel(flow_d);
+    }
+    else
+    {
+	ret = -PVFS_ENOSYS;
+    }
+    
+    gen_mutex_unlock(&interface_mutex);
+    return (ret);
 }
 
 

Index: flowproto-support.h
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/io/flow/flowproto-support.h,v
diff -p -u -r1.7 -r1.8
--- flowproto-support.h	21 Oct 2003 23:15:33 -0000	1.7
+++ flowproto-support.h	25 Feb 2004 01:16:58 -0000	1.8
@@ -26,6 +26,7 @@ struct flowproto_ops
 			      int option,
 			      void *parameter);
     int (*flowproto_post) (flow_descriptor * flow_d);
+    int (*flowproto_cancel) (flow_descriptor * flow_d);
 };
 
 /* used to query protocols to determine which endpoint pairs are



More information about the PVFS2-CVS mailing list