@@ -194,6 +194,11 @@ Prerequisites for building the OpenDataPlane (ODP) API
# Debian/Ubuntu
# apt-get install imagemagick
+ Message squence diagrams are stored as msc files and the png or eps versions generated when the docs are built
+ mscgen is used
+ #Debian/Ubuntu
+ # apt-get install mscgen
+
5.1 API Guide
See http://www.stack.nl/~dimitri/doxygen/manual/install.html
@@ -258,6 +258,16 @@ AM_CONDITIONAL([user_guide], [test "x${user_guides}" = "xyes" ])
AM_CONDITIONAL([HAVE_IMAGEMAGIC], [test "x${IMAGEMAGIC}" = "xconvert"])
##########################################################################
+# Check for mscgen availability
+##########################################################################
+ AC_CHECK_PROGS([MSCGEN], [mscgen])
+ if test -z "$MSCGEN";
+ then AC_MSG_WARN([mscgen not found - continuing without sequence message support])
+ fi
+
+AM_CONDITIONAL([HAVE_MSCGEN], [test "x${MSCGEN}" = "xmscgen"])
+
+##########################################################################
# Save and set temporary compilation flags
##########################################################################
OLD_LDFLAGS=$LDFLAGS
@@ -3,8 +3,10 @@ SVG_SRCS = atomic_queue.svg \
parallel_queue.svg
SVG_TARGETS = $(SVG_SRCS:svg=png)
SVG_TARGETS += $(SVG_SRCS:svg=eps)
+MSG_SRCS = resource_management.msc
+MSG_TARGETS = $(MSG_SRCS:msc=png)
-EXTRA_DIST = $(SVG_SRCS)
+EXTRA_DIST = $(SVG_SRCS) $(MSG_SRCS)
TARGETS=
@@ -12,10 +14,14 @@ if HAVE_IMAGEMAGIC
TARGETS += $(SVG_TARGETS)
endif
+if HAVE_MSCGEN
+TARGETS += $(MSG_TARGETS)
+endif
+
all-local: $(TARGETS)
clean-local:
- rm -f $(TARGETS)
+ rm -f $(SVG_TARGETS) $(MSG_TARGETS)
atomic_queue.png: atomic_queue.svg
convert $< $@
@@ -31,3 +37,6 @@ parallel_queue.png: parallel_queue.svg
convert $< $@
ordered_queue.eps: ordered_queue.svg
convert $< $@
+
+resource_management.png: resource_management.msc
+ mscgen -T png -i $< -o $@
new file mode 100644
@@ -0,0 +1,45 @@
+# ODP resource management
+msc {
+
+ a,b,c;
+
+ a->a [ label = "odp_init_global()"];
+ a->b [ label = "odp_thread_start()"];
+ a->c [ label = "odp_thread_start()"];
+ a->a [ label = "odp_init_local()"],
+ b->b [ label = "odp_init_local()"],
+ c->c [ label = "odp_init_local()"];
+ ---;
+ b->b [ label = "pool = odp_pool_create()", textcolour="#7f7fff"];
+
+ a->a [ label = "barrier()"],
+ b->b [ label = "barrier()"],
+ c->c [ label = "barrier()"];
+
+ a->a [ label = " buf = alloc(pool)", textcolour="#ffb000"],
+ b->b [ label = " buf = alloc(pool)", textcolour="#ffb000"],
+ c->c [ label = " buf = alloc(pool)", textcolour="#ffb000"];
+
+ a->a [ label = " free(buf)", textcolour="#ffb000"],
+ b->b [ label = " free(buf)", textcolour="#ffb000"],
+ c->c [ label = " free(buf)", textcolour="#ffb000"];
+
+ a->a [ label = "barrier()"],
+ b->b [ label = "barrier()"],
+ c->c [ label = "barrier()"];
+
+ a->a [ label = "pool = odp_pool_destroy(pool)", textcolour="#7f7fff"];
+ ---;
+ a->a [ label = "barrier()"],
+ b->b [ label = "barrier()"],
+ c->c [ label = "barrier()"];
+
+ --- [ label = "do work", ID="*" ];
+
+ a->a [ label = "odp_term_local()"],
+ b->b [ label = "odp_term_local()"],
+ c->c [ label = "odp_term_local()"];
+ b->a [ label = "odp_thread_term()"];
+ c->a [ label = "odp_thread_term()"];
+ a->a [ label = "odp_term_global()"];
+}
Signed-off-by: Mike Holmes <mike.holmes@linaro.org> --- DEPENDENCIES | 5 +++++ configure.ac | 10 +++++++++ doc/images/Makefile.am | 13 +++++++++-- doc/images/resource_management.msc | 45 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 71 insertions(+), 2 deletions(-) create mode 100644 doc/images/resource_management.msc