152733Sbostic/*- 2*61148Sbostic * Copyright (c) 1991, 1993 3*61148Sbostic * The Regents of the University of California. All rights reserved. 452733Sbostic * 552733Sbostic * This code is derived from software contributed to Berkeley by 652733Sbostic * Ralph Campbell. 752733Sbostic * 852733Sbostic * %sccs.include.redist.c% 952733Sbostic */ 1052733Sbostic 1152733Sbostic#include "SYS.h" 1252733Sbostic 1352733Sbostic#if defined(LIBC_SCCS) && !defined(lint) 14*61148Sbostic ASMSTR("@(#)sigprocmask.s 8.1 (Berkeley) 06/04/93") 1552733Sbostic#endif /* LIBC_SCCS and not lint */ 1652733Sbostic 1752733SbosticLEAF(sigprocmask) # sigprocmask(how, new, old) sigset_t *new, *old; 1852733Sbostic bne a1, zero, gotptr # if new sigset pointer not null 1952733Sbostic li a0, 1 # how = SIG_BLOCK 2052733Sbostic b doit # mask = zero 2152733Sbosticgotptr: 2252733Sbostic lw a1, 0(a1) # indirect to new mask arg 2352733Sbosticdoit: 2452733Sbostic li v0, SYS_sigprocmask 2552733Sbostic syscall 2652733Sbostic bne a3, zero, err 2752733Sbostic beq a2, zero, out # test if old mask requested 2852733Sbostic sw v0, 0(a2) # store old mask 2952733Sbosticout: 3052733Sbostic move v0, zero 3152733Sbostic j ra 3252733Sbosticerr: 3352733Sbostic j _cerror 3452733SbosticEND(sigprocmask) 35