diff options
author | Denis Vlasenko | 2008-06-27 02:52:20 +0000 |
---|---|---|
committer | Denis Vlasenko | 2008-06-27 02:52:20 +0000 |
commit | defc1ea34074e7882724c460260d307cdf981a70 (patch) | |
tree | fca9b9a5fe243f9c0c76b84824ea2ff92ea8e589 /libbb/signals.c | |
parent | 26bc57d8b26425f23f4be974cce7bf35c95c9a1a (diff) | |
download | busybox-defc1ea34074e7882724c460260d307cdf981a70.zip busybox-defc1ea34074e7882724c460260d307cdf981a70.tar.gz |
*: introduce and use FAST_FUNC: regparm on i386, otherwise no-on
text data bss dec hex filename
808035 611 6868 815514 c719a busybox_old
804472 611 6868 811951 c63af busybox_unstripped
Diffstat (limited to 'libbb/signals.c')
-rw-r--r-- | libbb/signals.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/libbb/signals.c b/libbb/signals.c index 1342c89..9591146 100644 --- a/libbb/signals.c +++ b/libbb/signals.c @@ -12,19 +12,19 @@ #include "libbb.h" /* Saves 2 bytes on x86! Oh my... */ -int sigaction_set(int signum, const struct sigaction *act) +int FAST_FUNC sigaction_set(int signum, const struct sigaction *act) { return sigaction(signum, act, NULL); } -int sigprocmask_allsigs(int how) +int FAST_FUNC sigprocmask_allsigs(int how) { sigset_t set; sigfillset(&set); return sigprocmask(how, &set, NULL); } -void bb_signals(int sigs, void (*f)(int)) +void FAST_FUNC bb_signals(int sigs, void (*f)(int)) { int sig_no = 0; int bit = 1; @@ -39,7 +39,7 @@ void bb_signals(int sigs, void (*f)(int)) } } -void bb_signals_recursive(int sigs, void (*f)(int)) +void FAST_FUNC bb_signals_recursive(int sigs, void (*f)(int)) { int sig_no = 0; int bit = 1; @@ -60,7 +60,7 @@ void bb_signals_recursive(int sigs, void (*f)(int)) } } -void sig_block(int sig) +void FAST_FUNC sig_block(int sig) { sigset_t ss; sigemptyset(&ss); @@ -68,7 +68,7 @@ void sig_block(int sig) sigprocmask(SIG_BLOCK, &ss, NULL); } -void sig_unblock(int sig) +void FAST_FUNC sig_unblock(int sig) { sigset_t ss; sigemptyset(&ss); @@ -76,7 +76,7 @@ void sig_unblock(int sig) sigprocmask(SIG_UNBLOCK, &ss, NULL); } -void wait_for_any_sig(void) +void FAST_FUNC wait_for_any_sig(void) { sigset_t ss; sigemptyset(&ss); @@ -84,7 +84,7 @@ void wait_for_any_sig(void) } /* Assuming the sig is fatal */ -void kill_myself_with_sig(int sig) +void FAST_FUNC kill_myself_with_sig(int sig) { signal(sig, SIG_DFL); sig_unblock(sig); @@ -92,7 +92,7 @@ void kill_myself_with_sig(int sig) _exit(EXIT_FAILURE); /* Should not reach it */ } -void signal_SA_RESTART_empty_mask(int sig, void (*handler)(int)) +void FAST_FUNC signal_SA_RESTART_empty_mask(int sig, void (*handler)(int)) { struct sigaction sa; memset(&sa, 0, sizeof(sa)); @@ -102,7 +102,7 @@ void signal_SA_RESTART_empty_mask(int sig, void (*handler)(int)) sigaction_set(sig, &sa); } -void signal_no_SA_RESTART_empty_mask(int sig, void (*handler)(int)) +void FAST_FUNC signal_no_SA_RESTART_empty_mask(int sig, void (*handler)(int)) { struct sigaction sa; memset(&sa, 0, sizeof(sa)); |