diff options
author | Denys Vlasenko | 2009-06-05 12:06:05 +0200 |
---|---|---|
committer | Denys Vlasenko | 2009-06-05 12:06:05 +0200 |
commit | d5f1b1bbe0a881f66b6bb6951fa54e553002c24d (patch) | |
tree | a3da20d19fa86c77e63c08f01d052b196cb1b192 /networking/inetd.c | |
parent | 8507e1f10927bc6498cf38eb8324a53bde8e0a61 (diff) | |
download | busybox-d5f1b1bbe0a881f66b6bb6951fa54e553002c24d.zip busybox-d5f1b1bbe0a881f66b6bb6951fa54e553002c24d.tar.gz |
*: add FAST_FUNC to function ptrs where it makes sense
function old new delta
evalcommand 1195 1209 +14
testcmd - 10 +10
printfcmd - 10 +10
echocmd - 10 +10
func_exec 270 276 +6
echo_dg 104 109 +5
store_nlmsg 85 89 +4
pseudo_exec_argv 195 198 +3
dotcmd 287 290 +3
machtime_stream 29 31 +2
discard_stream 24 26 +2
argstr 1299 1301 +2
killcmd 108 109 +1
evalfor 226 227 +1
daytime_stream 43 44 +1
run_list 2544 2543 -1
lookupvar 62 61 -1
ipaddr_modify 1310 1309 -1
...
parse_stream 2254 2245 -9
evalpipe 356 347 -9
collect_if 210 197 -13
read_opt 869 851 -18
handle_dollar 681 658 -23
print_addrinfo 1342 1303 -39
iterate_on_dir 156 59 -97
print_route 1709 1609 -100
------------------------------------------------------------------------------
(add/remove: 3/0 grow/shrink: 12/130 up/down: 74/-767) Total: -693 bytes
text data bss dec hex filename
841748 467 7872 850087 cf8a7 busybox_old
841061 467 7872 849400 cf5f8 busybox_unstripped
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/inetd.c')
-rw-r--r-- | networking/inetd.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/networking/inetd.c b/networking/inetd.c index 751010b..031edc3 100644 --- a/networking/inetd.c +++ b/networking/inetd.c @@ -239,36 +239,36 @@ typedef struct servtab_t { #ifdef INETD_BUILTINS_ENABLED /* Echo received data */ #if ENABLE_FEATURE_INETD_SUPPORT_BUILTIN_ECHO -static void echo_stream(int, servtab_t *); -static void echo_dg(int, servtab_t *); +static void FAST_FUNC echo_stream(int, servtab_t *); +static void FAST_FUNC echo_dg(int, servtab_t *); #endif /* Internet /dev/null */ #if ENABLE_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD -static void discard_stream(int, servtab_t *); -static void discard_dg(int, servtab_t *); +static void FAST_FUNC discard_stream(int, servtab_t *); +static void FAST_FUNC discard_dg(int, servtab_t *); #endif /* Return 32 bit time since 1900 */ #if ENABLE_FEATURE_INETD_SUPPORT_BUILTIN_TIME -static void machtime_stream(int, servtab_t *); -static void machtime_dg(int, servtab_t *); +static void FAST_FUNC machtime_stream(int, servtab_t *); +static void FAST_FUNC machtime_dg(int, servtab_t *); #endif /* Return human-readable time */ #if ENABLE_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME -static void daytime_stream(int, servtab_t *); -static void daytime_dg(int, servtab_t *); +static void FAST_FUNC daytime_stream(int, servtab_t *); +static void FAST_FUNC daytime_dg(int, servtab_t *); #endif /* Familiar character generator */ #if ENABLE_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN -static void chargen_stream(int, servtab_t *); -static void chargen_dg(int, servtab_t *); +static void FAST_FUNC chargen_stream(int, servtab_t *); +static void FAST_FUNC chargen_dg(int, servtab_t *); #endif struct builtin { /* NB: not necessarily NUL terminated */ char bi_service7[7]; /* internally provided service name */ uint8_t bi_fork; /* 1 if stream fn should run in child */ - void (*bi_stream_fn)(int, servtab_t *); - void (*bi_dgram_fn)(int, servtab_t *); + void (*bi_stream_fn)(int, servtab_t *) FAST_FUNC; + void (*bi_dgram_fn)(int, servtab_t *) FAST_FUNC; }; static const struct builtin builtins[] = { @@ -1386,7 +1386,7 @@ static const char *const cat_args[] = { "cat", NULL }; #if ENABLE_FEATURE_INETD_SUPPORT_BUILTIN_ECHO /* Echo service -- echo data back. */ /* ARGSUSED */ -static void echo_stream(int s, servtab_t *sep UNUSED_PARAM) +static void FAST_FUNC echo_stream(int s, servtab_t *sep UNUSED_PARAM) { #if BB_MMU while (1) { @@ -1407,7 +1407,7 @@ static void echo_stream(int s, servtab_t *sep UNUSED_PARAM) /* on failure we return to main, which does exit(EXIT_FAILURE) */ #endif } -static void echo_dg(int s, servtab_t *sep) +static void FAST_FUNC echo_dg(int s, servtab_t *sep) { enum { BUFSIZE = 12*1024 }; /* for jumbo sized packets! :) */ char *buf = xmalloc(BUFSIZE); /* too big for stack */ @@ -1427,7 +1427,7 @@ static void echo_dg(int s, servtab_t *sep) #if ENABLE_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD /* Discard service -- ignore data. */ /* ARGSUSED */ -static void discard_stream(int s, servtab_t *sep UNUSED_PARAM) +static void FAST_FUNC discard_stream(int s, servtab_t *sep UNUSED_PARAM) { #if BB_MMU while (safe_read(s, line, LINE_SIZE) > 0) @@ -1446,7 +1446,7 @@ static void discard_stream(int s, servtab_t *sep UNUSED_PARAM) #endif } /* ARGSUSED */ -static void discard_dg(int s, servtab_t *sep UNUSED_PARAM) +static void FAST_FUNC discard_dg(int s, servtab_t *sep UNUSED_PARAM) { /* dgram builtins are non-forking - DONT BLOCK! */ recv(s, line, LINE_SIZE, MSG_DONTWAIT); @@ -1467,7 +1467,7 @@ static void init_ring(void) } /* Character generator. MMU arches only. */ /* ARGSUSED */ -static void chargen_stream(int s, servtab_t *sep UNUSED_PARAM) +static void FAST_FUNC chargen_stream(int s, servtab_t *sep UNUSED_PARAM) { char *rs; int len; @@ -1495,7 +1495,7 @@ static void chargen_stream(int s, servtab_t *sep UNUSED_PARAM) } } /* ARGSUSED */ -static void chargen_dg(int s, servtab_t *sep) +static void FAST_FUNC chargen_dg(int s, servtab_t *sep) { int len; char text[LINESIZ + 2]; @@ -1544,14 +1544,14 @@ static uint32_t machtime(void) return htonl((uint32_t)(tv.tv_sec + 2208988800)); } /* ARGSUSED */ -static void machtime_stream(int s, servtab_t *sep UNUSED_PARAM) +static void FAST_FUNC machtime_stream(int s, servtab_t *sep UNUSED_PARAM) { uint32_t result; result = machtime(); full_write(s, &result, sizeof(result)); } -static void machtime_dg(int s, servtab_t *sep) +static void FAST_FUNC machtime_dg(int s, servtab_t *sep) { uint32_t result; len_and_sockaddr *lsa = alloca(LSA_LEN_SIZE + sep->se_lsa->len); @@ -1569,14 +1569,14 @@ static void machtime_dg(int s, servtab_t *sep) #if ENABLE_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME /* Return human-readable time of day */ /* ARGSUSED */ -static void daytime_stream(int s, servtab_t *sep UNUSED_PARAM) +static void FAST_FUNC daytime_stream(int s, servtab_t *sep UNUSED_PARAM) { time_t t; t = time(NULL); fdprintf(s, "%.24s\r\n", ctime(&t)); } -static void daytime_dg(int s, servtab_t *sep) +static void FAST_FUNC daytime_dg(int s, servtab_t *sep) { time_t t; len_and_sockaddr *lsa = alloca(LSA_LEN_SIZE + sep->se_lsa->len); |