diff options
author | hunt <hunt> | 2005-07-08 20:51:09 +0000 |
---|---|---|
committer | hunt <hunt> | 2005-07-08 20:51:09 +0000 |
commit | 388451654e4651d9abf99cc97d927f3b97fc31d3 (patch) | |
tree | 285c5877041d9e445f3781caa84e2ec443a1e3cf /runtime/runtime.h | |
parent | 14e686e8fbd7b16171f7fc643dd99c3479673752 (diff) | |
download | systemtap-steved-388451654e4651d9abf99cc97d927f3b97fc31d3.tar.gz systemtap-steved-388451654e4651d9abf99cc97d927f3b97fc31d3.tar.xz systemtap-steved-388451654e4651d9abf99cc97d927f3b97fc31d3.zip |
2005-07-08 Martin Hunt <hunt@redhat.com>
* runtime.h: Move some common pieces of modules into this file.
Includes MODULE_LICENSE, cleanup_module and init_module.
Diffstat (limited to 'runtime/runtime.h')
-rw-r--r-- | runtime/runtime.h | 23 |
1 files changed, 23 insertions, 0 deletions
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_ */ |