From ba55284d44e947429a72f8d6a5017353037604a0 Mon Sep 17 00:00:00 2001 From: Jef Poskanzer Date: Mon, 18 Feb 2013 07:33:36 -0800 Subject: [PATCH] Added some "hot" attributes to mark a few routines that deserve extra optimization. Most likely this has no effect. --- src/iperf_api.h | 2 +- src/iperf_tcp.h | 2 +- src/iperf_udp.h | 2 +- src/net.h | 2 +- src/timer.h | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/iperf_api.h b/src/iperf_api.h index e3c00c4..102387e 100644 --- a/src/iperf_api.h +++ b/src/iperf_api.h @@ -156,7 +156,7 @@ long get_tcpinfo_total_retransmits(struct iperf_interval_results *irp); void print_tcpinfo(struct iperf_test *test); void build_tcpinfo_message(struct iperf_interval_results *r, char *message); -int iperf_send(struct iperf_test *, fd_set *); +int iperf_send(struct iperf_test *, fd_set *) __attribute__((hot)); int iperf_recv(struct iperf_test *, fd_set *); void sig_handler(int); void usage(); diff --git a/src/iperf_tcp.h b/src/iperf_tcp.h index c9f1ade..32242ee 100644 --- a/src/iperf_tcp.h +++ b/src/iperf_tcp.h @@ -35,7 +35,7 @@ int iperf_tcp_recv(struct iperf_stream *); * returns: bytes sent * */ -int iperf_tcp_send(struct iperf_stream *); +int iperf_tcp_send(struct iperf_stream *) __attribute__((hot)); int iperf_tcp_listen(struct iperf_test *); diff --git a/src/iperf_udp.h b/src/iperf_udp.h index cbc8b38..f67ac03 100644 --- a/src/iperf_udp.h +++ b/src/iperf_udp.h @@ -25,7 +25,7 @@ int iperf_udp_recv(struct iperf_stream *); * returns: bytes sent * */ -int iperf_udp_send(struct iperf_stream *); +int iperf_udp_send(struct iperf_stream *) __attribute__((hot)); /** diff --git a/src/net.h b/src/net.h index ea12a91..a960b27 100644 --- a/src/net.h +++ b/src/net.h @@ -12,7 +12,7 @@ int netdial(int, int, char *, char *, int); int netannounce(int, int, char *, int); -int Nwrite(int, void *, int, int); +int Nwrite(int, void *, int, int) __attribute__((hot)); int Nread(int, void *, int, int); int getsock_tcp_mss(int); int set_tcp_options(int, int, int); diff --git a/src/timer.h b/src/timer.h index 0d50d60..7585c7c 100644 --- a/src/timer.h +++ b/src/timer.h @@ -55,12 +55,12 @@ extern Timer* tmr_create( ** can just put the call to this routine right in your select(). Returns ** (struct timeval*) 0 if no timers are pending. */ -extern struct timeval* tmr_timeout( struct timeval* nowP ); +extern struct timeval* tmr_timeout( struct timeval* nowP ) __attribute__((hot)); /* Run the list of timers. Your main program needs to call this every so often, ** or as indicated by tmr_timeout(). */ -extern void tmr_run( struct timeval* nowP ); +extern void tmr_run( struct timeval* nowP ) __attribute__((hot)); /* Reset the clock on a timer, to current time plus the original timeout. */ extern void tmr_reset( struct timeval* nowP, Timer* timer );