2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
5 Desc: Checks for signals in a mask.
8 #include <exec/tasks.h>
9 #include <proto/exec.h>
10 #include "dos_intern.h"
12 /*****************************************************************************
15 #include <proto/dos.h>
17 AROS_LH1(LONG
, CheckSignal
,
20 AROS_LHA(LONG
, mask
, D1
),
23 struct DosLibrary
*, DOSBase
, 132, Dos
)
26 Checks the current task to see if any of the signals specified in
27 the mask have been set. The mask of all signals which were set is
28 returned. The signals specified in the mask will be cleared.
31 mask - The signal mask to check.
34 The mask of all signals which were set.
46 *****************************************************************************/
52 /* Get pointer to current task structure */
53 struct Task
*me
= FindTask(NULL
);
55 /* Protect the signal mask against access by other tasks. */
58 /* Get active signals specified in mask */
59 rcvd
= me
->tc_SigRecvd
& mask
;
62 me
->tc_SigRecvd
&= ~mask
;