From 3e9ee4c86feb656a120d3260fd6f5e81471feeb6 Mon Sep 17 00:00:00 2001 From: compudj Date: Fri, 30 May 2003 18:16:34 +0000 Subject: [PATCH] examples git-svn-id: http://ltt.polymtl.ca/svn@52 04897980-b3bd-0310-b5e0-8ef037075253 --- .../poly/lttv/plugins/samples/Makefile.am | 15 +++++++++++++ .../poly/lttv/plugins/samples/sampledep.c | 21 +++++++++++++++++++ .../poly/lttv/plugins/samples/samplemodule.c | 15 +++++++++++++ .../poly/lttv/plugins/samples/samplemodule2.c | 15 +++++++++++++ 4 files changed, 66 insertions(+) create mode 100644 ltt/branches/poly/lttv/plugins/samples/Makefile.am create mode 100644 ltt/branches/poly/lttv/plugins/samples/sampledep.c create mode 100644 ltt/branches/poly/lttv/plugins/samples/samplemodule.c create mode 100644 ltt/branches/poly/lttv/plugins/samples/samplemodule2.c diff --git a/ltt/branches/poly/lttv/plugins/samples/Makefile.am b/ltt/branches/poly/lttv/plugins/samples/Makefile.am new file mode 100644 index 00000000..77f933df --- /dev/null +++ b/ltt/branches/poly/lttv/plugins/samples/Makefile.am @@ -0,0 +1,15 @@ +# +# Makefile for LTT New generation user interface : test plugins. +# +# Created by Mathieu Desnoyers on May 6, 2003 +# + +libdir = ${lttvplugindir} + +lib_LTLIBRARIES = sampledep.la samplemodule.la samplemodule2.la +sampledep_la_LDFLAGS = -module +sampledep_la_SOURCES = sampledep.c +samplemodule_la_LDFLAGS = -module +samplemodule_la_SOURCES = samplemodule.c +samplemodule2_la_LDFLAGS = -module +samplemodule2_la_SOURCES = samplemodule2.c diff --git a/ltt/branches/poly/lttv/plugins/samples/sampledep.c b/ltt/branches/poly/lttv/plugins/samples/sampledep.c new file mode 100644 index 00000000..805c5283 --- /dev/null +++ b/ltt/branches/poly/lttv/plugins/samples/sampledep.c @@ -0,0 +1,21 @@ +/* Sample module for Linux Trace Toolkit new generation User Interface */ + +/* Created by Mathieu Desnoyers, may 2003 */ + +#include +#include + +/* Include module.h from lttv headers for module loading */ +#include + +G_MODULE_EXPORT void init() { + g_critical("Sample module dependant init()"); + + lttv_module_load("samplemodule",0,NULL,DEPENDANT); +} + +G_MODULE_EXPORT void destroy() { + g_critical("Sample module dependant destroy()"); + lttv_module_unload_name("samplemodule",DEPENDANT); +} + diff --git a/ltt/branches/poly/lttv/plugins/samples/samplemodule.c b/ltt/branches/poly/lttv/plugins/samples/samplemodule.c new file mode 100644 index 00000000..e64ab2f4 --- /dev/null +++ b/ltt/branches/poly/lttv/plugins/samples/samplemodule.c @@ -0,0 +1,15 @@ +/* Sample module for Linux Trace Toolkit new generation User Interface */ + +/* Created by Mathieu Desnoyers, may 2003 */ + +#include +#include + +G_MODULE_EXPORT void init() { + g_critical("Sample module init()"); +} + +G_MODULE_EXPORT void destroy() { + g_critical("Sample module destroy()"); +} + diff --git a/ltt/branches/poly/lttv/plugins/samples/samplemodule2.c b/ltt/branches/poly/lttv/plugins/samples/samplemodule2.c new file mode 100644 index 00000000..3d7bb1c0 --- /dev/null +++ b/ltt/branches/poly/lttv/plugins/samples/samplemodule2.c @@ -0,0 +1,15 @@ +/* Sample module for Linux Trace Toolkit new generation User Interface */ + +/* Created by Mathieu Desnoyers, may 2003 */ + +#include +#include + +G_MODULE_EXPORT void init() { + g_critical("Sample module 2 init()"); +} + +G_MODULE_EXPORT void destroy() { + g_critical("Sample module 2 destroy()"); +} + -- 2.34.1