From 388451654e4651d9abf99cc97d927f3b97fc31d3 Mon Sep 17 00:00:00 2001 From: hunt Date: Fri, 8 Jul 2005 20:51:09 +0000 Subject: 2005-07-08 Martin Hunt * runtime.h: Move some common pieces of modules into this file. Includes MODULE_LICENSE, cleanup_module and init_module. --- runtime/runtime.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'runtime/runtime.h') diff --git a/runtime/runtime.h b/runtime/runtime.h index 1be35b77..62de5b20 100644 --- a/runtime/runtime.h +++ b/runtime/runtime.h @@ -55,4 +55,27 @@ static struct #include "print.c" #include "string.c" +/************* Module Stuff ********************/ +int probe_start(void); + +int init_module(void) +{ + int ret; + + /* First open connection. This exits on failure. */ + TRANSPORT_OPEN; + + ret = probe_start(); + if (ret < 0) + _stp_transport_close(); +} + +void cleanup_module(void) +{ + _stp_transport_cleanup(); + _stp_transport_close(); +} + +MODULE_LICENSE("GPL"); + #endif /* _RUNTIME_H_ */ -- cgit