Added functions to flush all messages in edges connected to one ends structure
authorppisa <ppisa>
Sat, 5 Jun 2004 15:41:17 +0000 (15:41 +0000)
committerppisa <ppisa>
Sat, 5 Jun 2004 15:41:17 +0000 (15:41 +0000)
lincan/include/can_queue.h
lincan/src/can_queue.c

index c3df3ad..107074c 100644 (file)
@@ -529,6 +529,10 @@ int canqueue_ends_kill_outlist(struct canque_ends_t *qends);
 
 int canqueue_ends_filt_conjuction(struct canque_ends_t *qends, struct canfilt_t *filt);
 
+int canqueue_ends_flush_inlist(struct canque_ends_t *qends);
+
+int canqueue_ends_flush_outlist(struct canque_ends_t *qends);
+
 /* edge reference and traversal functions */
 
 void canque_edge_do_dead(struct canque_edge_t *edge, int dead_fl);
index c4130aa..9b62635 100644 (file)
@@ -694,3 +694,40 @@ int canqueue_ends_filt_conjuction(struct canque_ends_t *qends, struct canfilt_t
        return cnt;
 }
 
+
+/**
+ * canqueue_ends_flush_inlist - flushes all messages in incoming edges
+ * @qends: pointer to ends structure
+ *
+ * Return Value: Negative value informs about unsuccessful result
+ */
+int canqueue_ends_flush_inlist(struct canque_ends_t *qends)
+{
+       struct canque_edge_t *edge;
+       
+       canque_for_each_inedge(qends, edge){
+               canque_flush(edge);
+       }
+       return 0;
+}
+
+
+/**
+ * canqueue_ends_flush_outlist - flushes all messages in outgoing edges
+ * @qends: pointer to ends structure
+ *
+ * Return Value: Negative value informs about unsuccessful result
+ */
+int canqueue_ends_flush_outlist(struct canque_ends_t *qends)
+{
+       struct canque_edge_t *edge;
+       
+       canque_for_each_outedge(qends, edge){
+               canque_flush(edge);
+       }
+       return 0;
+}
+
+
+
+