From 3ca3cf924886beab449d85e1232d0936b501c4f0 Mon Sep 17 00:00:00 2001 From: hunt Date: Mon, 1 Aug 2005 21:40:52 +0000 Subject: 2005-08-01 Martin Hunt * librelay.h: Get structs and enums from ../transport/transport_msgs.h to eliminate duplication. * librelay.c (send_request): Retry if send fails. (open_relayfs_files): Use fopen() instead of open() for the percpu tmpfiles. (request_last_buffers): Just send cpu number for STP_BUF_INFO request. (reader_thread): Ditto. (process_subbufs): Use fwrite_unlocked() instead of write(). (sigchld): Removed. (init_stp): Go back to using system() instead of fork and exec to load module. When done, send a TRANSPORT_INFO request. (cleanup_and_exit): Change parameter to simple flag to indicate if the module needs removing. (sigproc): Remove complicated logic and just send STP_EXIT. (stp_main_loop): When receiving STP_TRANSPORT_INFO, set the local params and reply with a STP_START. When receiving STP_START, there was an error, so cleanup and exit. * stpd.c (main): Added new options to set number of buffers and their size. --- runtime/stpd/librelay.h | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) (limited to 'runtime/stpd/librelay.h') diff --git a/runtime/stpd/librelay.h b/runtime/stpd/librelay.h index 59273d8e..371ddfbd 100644 --- a/runtime/stpd/librelay.h +++ b/runtime/stpd/librelay.h @@ -1,25 +1,8 @@ -/* SystemTap control channel command values */ -enum -{ - STP_BUF_INFO = 1, - STP_SUBBUFS_CONSUMED, - STP_REALTIME_DATA, - STP_TRANSPORT_MODE, - STP_EXIT, -}; - -/* SystemTap transport options */ -enum -{ - STP_TRANSPORT_NETLINK = 1, - STP_TRANSPORT_RELAYFS -}; +#include "../transport/transport_msgs.h" /* * stp external API functions */ -extern int init_stp(const char *modname, - const char *relay_filebase, - int print_summary); +extern int init_stp(const char *relay_filebase, int print_summary); extern int stp_main_loop(void); extern int send_request(int type, void *data, int len); -- cgit