144822Sbostic/*- 2*61135Sbostic * Copyright (c) 1990, 1993 3*61135Sbostic * The Regents of the University of California. All rights reserved. 444822Sbostic * 544822Sbostic * This code is derived from software contributed to Berkeley by 644822Sbostic * William Jolitz. 744822Sbostic * 844822Sbostic * %sccs.include.redist.c% 944822Sbostic */ 1044822Sbostic 1144822Sbostic#if defined(SYSLIBC_SCCS) && !defined(lint) 12*61135Sbostic .asciz "@(#)sigprocmask.s 8.1 (Berkeley) 06/04/93" 1344822Sbostic#endif /* SYSLIBC_SCCS and not lint */ 1444822Sbostic 1544822Sbostic#include "SYS.h" 1644822Sbostic 1744822Sbosticerr: 1844822Sbostic jmp cerror 1944822Sbostic 2044822SbosticENTRY(sigprocmask) 2144822Sbostic movl 8(%esp),%ecx # fetch new sigset pointer 2245828Swilliam cmpl $0,%ecx # check new sigset pointer 2344822Sbostic jne 1f # if not null, indirect 2444822Sbostic/* movl $0,8(%esp) # null mask pointer: block empty set */ 2544822Sbostic movl $1,4(%esp) # SIG_BLOCK 2644822Sbostic jmp 2f 2744822Sbostic1: movl (%ecx),%ecx # fetch indirect ... 2844822Sbostic movl %ecx,8(%esp) # to new mask arg 2944822Sbostic2: movl $ SYS_sigprocmask , %eax 3044822Sbostic LCALL(0x7,0) 3144822Sbostic jb err 3244822Sbostic movl 12(%esp),%ecx # fetch old mask requested 3344822Sbostic cmpl $0,%ecx # test if old mask requested 3444822Sbostic je out 3544822Sbostic movl %eax,(%ecx) # store old mask 3644822Sbosticout: 3744822Sbostic xorl %eax,%eax 3844822Sbostic ret 39