summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorhunt <hunt>2006-09-26 17:22:39 +0000
committerhunt <hunt>2006-09-26 17:22:39 +0000
commit79435bf0960e407b41fd54dd5632cf55c75f3254 (patch)
tree92137be05201dd9c6aae685980eb1b2cc162b34b /runtime
parent8eff06850bacdc059867a45a0c28dc96009d2682 (diff)
downloadsystemtap-steved-79435bf0960e407b41fd54dd5632cf55c75f3254.tar.gz
systemtap-steved-79435bf0960e407b41fd54dd5632cf55c75f3254.tar.xz
systemtap-steved-79435bf0960e407b41fd54dd5632cf55c75f3254.zip
2006-09-26 Martin Hunt <hunt@redhat.com>
* transport.c (_stp_handle_start): Don't initialize timers here. (_stp_transport_init): Initialize timers here. (_stp_cleanup_and_exit): Don't kill timers or free print buffers here. (_stp_transport_close): kill timers and free print buffers here.
Diffstat (limited to 'runtime')
-rw-r--r--runtime/transport/ChangeLog7
-rw-r--r--runtime/transport/transport.c21
2 files changed, 19 insertions, 9 deletions
diff --git a/runtime/transport/ChangeLog b/runtime/transport/ChangeLog
index 71fc2fdb..f9c5af19 100644
--- a/runtime/transport/ChangeLog
+++ b/runtime/transport/ChangeLog
@@ -1,3 +1,10 @@
+2006-09-26 Martin Hunt <hunt@redhat.com>
+
+ * transport.c (_stp_handle_start): Don't initialize timers here.
+ (_stp_transport_init): Initialize timers here.
+ (_stp_cleanup_and_exit): Don't kill timers or free print buffers here.
+ (_stp_transport_close): kill timers and free print buffers here.
+
2006-09-25 Tom Zanussi <zanussi@us.ibm.com>
* procfs.c (_stp_proc_read): Set buf_info flushing flag.
diff --git a/runtime/transport/transport.c b/runtime/transport/transport.c
index c0684ae4..e7dd7d97 100644
--- a/runtime/transport/transport.c
+++ b/runtime/transport/transport.c
@@ -93,13 +93,10 @@ static void _stp_handle_buf_info(int *cpuptr)
*/
void _stp_handle_start (struct transport_start *st)
{
- int ret;
kbug ("stp_handle_start pid=%d\n", st->pid);
- ret = _stp_init_time();
-
/* note: st->pid is actually the return code for the reply packet */
- st->pid = unlikely(ret) ? ret : probe_start();
+ st->pid = probe_start();
atomic_set(&_stp_start_finished,1);
/* if probe_start() failed, suppress calling probe_exit() */
@@ -153,11 +150,6 @@ static void _stp_cleanup_and_exit (int dont_rmmod)
/* tell stpd to exit (if it is still there) */
_stp_transport_send(STP_EXIT, &dont_rmmod, sizeof(int));
kbug("done with transport_send STP_EXIT\n");
-
- _stp_kill_time();
-
- /* free print buffers */
- _stp_print_cleanup();
}
}
@@ -206,6 +198,13 @@ void _stp_transport_close()
_stp_relayfs_close(_stp_chan, _stp_dir);
#endif
_stp_unregister_procfs();
+
+ _stp_kill_time();
+
+ /* free print buffers */
+ _stp_print_cleanup();
+
+
kbug("---- CLOSED ----\n");
}
@@ -277,6 +276,10 @@ int _stp_transport_init(void)
if (_stp_print_init() < 0)
return -1;
+ /* initialize timer code */
+ if (_stp_init_time())
+ return -1;
+
/* set up procfs communications */
if (_stp_register_procfs() < 0)
return -1;