diff mbox

[PATCHv3,1/2] doc: userguide: add timer/timeout state diagram

Message ID 1462923961-6798-1-git-send-email-bill.fischofer@linaro.org
State New
Headers show

Commit Message

Bill Fischofer May 10, 2016, 11:46 p.m. UTC
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
---
 doc/images/.gitignore       |  1 +
 doc/images/timer_fsm.gv     | 55 +++++++++++++++++++++++++++++++++++++++++++++
 doc/users-guide/Makefile.am |  1 +
 3 files changed, 57 insertions(+)
 create mode 100644 doc/images/timer_fsm.gv
diff mbox

Patch

diff --git a/doc/images/.gitignore b/doc/images/.gitignore
index a19aa75..72cf7ec 100644
--- a/doc/images/.gitignore
+++ b/doc/images/.gitignore
@@ -1,2 +1,3 @@ 
 resource_management.svg
 pktio_fsm.svg
+timer_fsm.svg
diff --git a/doc/images/timer_fsm.gv b/doc/images/timer_fsm.gv
new file mode 100644
index 0000000..69370a2
--- /dev/null
+++ b/doc/images/timer_fsm.gv
@@ -0,0 +1,55 @@ 
+digraph timer_state_machine {
+	rankdir=LR;
+	size="12,20";
+	node [fontsize=28];
+	edge [fontsize=28];
+	node [shape=doublecircle]; Timer_Unalloc
+				   Timeout_Unalloc
+				   Timeout_Delivered;
+	node [shape=rectangle]; Timeout_Queued;
+	node [shape=circle];
+
+	Timer_Unalloc -> Timer_Alloc [fontcolor=green,
+				     label="odp_timer_alloc()"];
+	Timer_Alloc -> Timer_Unalloc [fontcolor=green,
+				     label="odp_timer_free()"];
+
+	Timeout_Unalloc -> Timeout_Alloc
+			 [fontcolor=blue,
+			 label="odp_timeout_alloc()"];
+	Timeout_Alloc -> Timeout_Unalloc
+			 [fontcolor=blue,
+			 label="odp_timeout_free()"];
+
+	Timer_Alloc -> Timer_Set [fontcolor=green, label="odp_timer_set_abs()"];
+	Timer_Alloc -> Timer_Set [fontcolor=green, label="odp_timer_set_rel()"];
+	Timer_Set -> Timer_Alloc [fontcolor=green, label="odp_timer_cancel()"];
+
+	Timeout_Alloc -> Timer_Set
+			 [fontcolor=blue,
+			 label="odp_timer_set_abs()"];
+	Timeout_Alloc -> Timer_Set
+			 [fontcolor=blue, label="odp_timer_set_rel()"];
+	Timer_Set -> Timeout_Alloc
+			[fontcolor=blue,
+			label="odp_timer_cancel()"];
+
+	Timer_Set -> Timeout_Queued [fontcolor=red, label="=>odp_queue_enq()"];
+	Timeout_Queued -> Timeout_Delivered [fontcolor=red,
+					    label="odp_schedule()"];
+
+	Timeout_Delivered -> Timer_Unalloc [fontcolor=green,
+			     label="odp_timer_free()"];
+	Timeout_Delivered -> Timer_Set [fontcolor=green,
+				       label="odp_timer_set_abs()"];
+	Timeout_Delivered -> Timer_Set [fontcolor=green,
+				       label="odp_timer_set_rel()"];
+	Timeout_Delivered -> Timeout_Delivered
+			  [fontcolor=blue, label="odp_timeout_from_event()"];
+	Timeout_Delivered -> Timeout_Delivered
+			  [fontcolor=green, label="odp_timeout_timer()"];
+	Timeout_Delivered -> Timeout_Unalloc
+			  [fontcolor=blue,
+			  label="odp_event_free(), odp_timeout_free()"
+			  constraint=false];
+}
diff --git a/doc/users-guide/Makefile.am b/doc/users-guide/Makefile.am
index 74caa96..6bb0131 100644
--- a/doc/users-guide/Makefile.am
+++ b/doc/users-guide/Makefile.am
@@ -30,6 +30,7 @@  IMAGES = $(top_srcdir)/doc/images/overview.svg \
 	 $(top_srcdir)/doc/images/release_git.svg \
 	 $(top_srcdir)/doc/images/segment.svg \
 	 $(top_srcdir)/doc/images/simple_release_git.svg \
+	 $(top_srcdir)/doc/images/timer_fsm.svg \
 	 $(top_srcdir)/doc/images/tm_hierarchy.svg \
 	 $(top_srcdir)/doc/images/tm_node.svg