2 Copyright © 1995-2015, The AROS Development Team. All rights reserved.
5 Desc: Examine and/or modify the signals of a task.
8 #include <exec/execbase.h>
9 #include <aros/libcall.h>
10 #include <proto/exec.h>
12 #include "exec_intern.h"
13 #if defined(__AROSEXEC_SMP__)
17 /*****************************************************************************
21 AROS_LH2(ULONG
, SetSignal
,
24 AROS_LHA(ULONG
, newSignals
, D0
),
25 AROS_LHA(ULONG
, signalSet
, D1
),
28 struct ExecBase
*, SysBase
, 51, Exec
)
31 Change or read the set of signals sent to the current task.
34 newSignals - New values for the signals.
35 signalSet - Mask of signals affected by 'newSignals'.
47 AllocSignal(), FreeSignal(), Wait(), Signal(), SetExcept()
51 ******************************************************************************/
55 struct Task
*ThisTask
= GET_THIS_TASK
;
59 /* Protect the signal mask against access by other tasks. */
60 #if defined(__AROSEXEC_SMP__)
61 EXEC_SPINLOCK_LOCK(&IntETask(ThisTask
->tc_UnionETask
.tc_ETask
)->iet_TaskLock
, SPINLOCK_MODE_WRITE
);
66 sig
= &ThisTask
->tc_SigRecvd
;
68 /* Change only the bits in 'mask' */
70 *sig
= (old
& ~signalSet
) | (newSignals
& signalSet
);
72 #if defined(__AROSEXEC_SMP__)
73 EXEC_SPINLOCK_UNLOCK(&IntETask(ThisTask
->tc_UnionETask
.tc_ETask
)->iet_TaskLock
);