diff --git a/linux/alpha/syscallent.h b/linux/alpha/syscallent.h index 848c3230..ae7821f8 100644 --- a/linux/alpha/syscallent.h +++ b/linux/alpha/syscallent.h @@ -75,7 +75,7 @@ [ 45] = { 3, TD|TF, SEN(open), "open" }, [ 46] = { 5, 0, SEN(printargs), "osf_old_sigaction" }, /* not implemented */ [ 47] = { 0, NF, SEN(getxgid), "getxgid" }, -[ 48] = { 2, TS, SEN(sigprocmask), "osf_sigprocmask" }, +[ 48] = { 2, TS, SEN(osf_sigprocmask), "osf_sigprocmask" }, [ 49] = { 5, 0, SEN(printargs), "osf_getlogin" }, /* not implemented */ [ 50] = { 5, 0, SEN(printargs), "osf_setlogin" }, /* not implemented */ [ 51] = { 1, TF, SEN(acct), "acct" }, diff --git a/signal.c b/signal.c index f3333975..c8b0a5f5 100644 --- a/signal.c +++ b/signal.c @@ -415,22 +415,21 @@ SYS_FUNC(sigsuspend) return RVAL_DECODED; } -/* "Old" sigprocmask, which operates with word-sized signal masks */ -SYS_FUNC(sigprocmask) +#ifdef ALPHA +/* + * The OSF/1 sigprocmask is different: it doesn't pass in two pointers, + * but rather passes in the new bitmask as an argument and then returns + * the old bitmask. This "works" because we only have 64 signals to worry + * about. If you want more, use of the rt_sigprocmask syscall is required. + * + * Alpha: + * old = osf_sigprocmask(how, new); + * Everyone else: + * ret = sigprocmask(how, &new, &old, ...); + */ +SYS_FUNC(osf_sigprocmask) { -# ifdef ALPHA if (entering(tcp)) { - /* - * Alpha/OSF is different: it doesn't pass in two pointers, - * but rather passes in the new bitmask as an argument and - * then returns the old bitmask. This "works" because we - * only have 64 signals to worry about. If you want more, - * use of the rt_sigprocmask syscall is required. - * Alpha: - * old = osf_sigprocmask(how, new); - * Everyone else: - * ret = sigprocmask(how, &new, &old, ...); - */ printxval(sigprocmaskcmds, tcp->u_arg[0], "SIG_???"); tprintsigmask_val(", ", tcp->u_arg[1]); } @@ -438,7 +437,14 @@ SYS_FUNC(sigprocmask) tcp->auxstr = sprintsigmask_val("old mask ", tcp->u_rval); return RVAL_HEX | RVAL_STR; } -# else /* !ALPHA */ + return 0; +} + +#else /* !ALPHA */ + +/* "Old" sigprocmask, which operates with word-sized signal masks */ +SYS_FUNC(sigprocmask) +{ if (entering(tcp)) { printxval(sigprocmaskcmds, tcp->u_arg[0], "SIG_???"); tprints(", "); @@ -448,9 +454,9 @@ SYS_FUNC(sigprocmask) else { print_sigset_addr_len(tcp, tcp->u_arg[2], current_wordsize); } -# endif /* !ALPHA */ return 0; } +#endif /* !ALPHA */ SYS_FUNC(kill) {