Sync usage with man page.
[netbsd-mini2440.git] / lib / libc / pc532 / sys / sigprocmask.s
blob2fffa51a684d4b9659dfddabcfee6a03f14f7d36
1 /*
2 * Copyright (c) 1992 Helsinki University of Technology
3 * All Rights Reserved.
4 *
5 * Permission to use, copy, modify and distribute this software and its
6 * documentation is hereby granted, provided that both the copyright
7 * notice and this permission notice appear in all copies of the
8 * software, derivative works or modified versions, and any portions
9 * thereof, and that both notices appear in supporting documentation.
11 * HELSINKI UNIVERSITY OF TECHNOLOGY ALLOWS FREE USE OF THIS SOFTWARE IN
12 * ITS "AS IS" CONDITION. HELSINKI UNIVERSITY OF TECHNOLOGY DISCLAIMS ANY
13 * LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE
14 * USE OF THIS SOFTWARE.
17 * HISTORY
18 * 29-Apr-92 Johannes Helander (jvh) at Helsinki University of Technology
19 * Created.
21 * $Id: sigprocmask.s,v 1.1 1993/09/17 18:43:50 phil Exp $
24 /*
25 * Note: Has never been tested. Debug before use.
29 #include <sys/syscall.h>
30 #include "SYS.h"
32 ENTRY(sigprocmask)
33 movd S_ARG1, r1 /* fetch new sigset pointer */
34 cmpqd 0, r1 /* check new sigset pointer */
35 bne L1 /* if not null, indirect */
36 /* movqd 0, S_ARG1 /* null mask pointer: block empty set */
37 movqd 1, S_ARG0 /* SIG_BLOCK */
38 br L2
39 L1: movd 0(r1), r1 /* fetch indirect ... */
40 movd r1, S_ARG1 /* to new mask arg */
41 L2: movd SYS_sigprocmask, r0
42 SVC
43 bcs cerror
44 movd S_ARG2, r1 /* fetch old mask requested */
45 cmpqd 0, r1 /* test if old mask requested */
46 beq out
47 movd r0, 0(r1) /* store old mask */
48 out:
49 movqd 0, r0
50 ret 0