2 Copyright © 1995-2001, 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 *****************************************************************************/
49 AROS_LIBBASE_EXT_DECL(struct DosLibrary
*,DOSBase
)
53 /* Get pointer to current task structure */
54 struct Task
*me
= FindTask(NULL
);
56 /* Protect the signal mask against access by other tasks. */
59 /* Get active signals specified in mask */
60 rcvd
= me
->tc_SigRecvd
& mask
;
63 me
->tc_SigRecvd
&= ~mask
;