2 Copyright © 1995-2002, The AROS Development Team. All rights reserved.
6 #include <proto/exec.h>
7 #include <aros/libcall.h>
8 #include <clib/exec_protos.h>
9 #include <exec/execbase.h>
10 #include <exec/tasks.h>
15 /* Function prototype needed on Linux-M68K*/
16 AROS_LD2(ULONG
,handler
,
17 AROS_LDA(ULONG
,signals
,D0
),
18 AROS_LDA(APTR
,exceptData
,A1
),
19 struct ExecBase
*,SysBase
,0,Test
);
21 AROS_LH2(ULONG
,handler
,
22 AROS_LHA(ULONG
,signals
,D0
),
23 AROS_LHA(APTR
,exceptData
,A1
),
24 struct ExecBase
*,SysBase
,0,Test
)
41 printf("sig1: %d\n",s1
);
45 struct Task
*task
= FindTask(NULL
);
46 printf("sig2: %d\n",s2
);
47 oldexc
=task
->tc_ExceptCode
;
48 task
->tc_ExceptCode
=&AROS_SLIB_ENTRY(handler
,Test
,0);
49 SetExcept(1<<s2
,1<<s2
);
50 Signal(task
,(1<<s2
)|(1<<s1
));
52 task
->tc_ExceptCode
=oldexc
;
53 printf("got: %08lx\n",(unsigned long)s
);