Last change
on this file since 536 was
444,
checked in by satin@…, 6 years ago
|
add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc
|
File size:
717 bytes
|
Line | |
---|
1 | #include <_ansi.h> |
---|
2 | #include <signal.h> |
---|
3 | #include "swi.h" |
---|
4 | |
---|
5 | int _kill (int, int); |
---|
6 | |
---|
7 | int |
---|
8 | _kill (int pid, int sig) |
---|
9 | { |
---|
10 | (void) pid; (void) sig; |
---|
11 | #ifdef ARM_RDI_MONITOR |
---|
12 | /* Note: The pid argument is thrown away. */ |
---|
13 | int block[2]; |
---|
14 | block[1] = sig; |
---|
15 | int insn; |
---|
16 | |
---|
17 | #if SEMIHOST_V2 |
---|
18 | if (_has_ext_exit_extended ()) |
---|
19 | { |
---|
20 | insn = AngelSWI_Reason_ReportExceptionExtended; |
---|
21 | } |
---|
22 | else |
---|
23 | #endif |
---|
24 | { |
---|
25 | insn = AngelSWI_Reason_ReportException; |
---|
26 | } |
---|
27 | |
---|
28 | switch (sig) |
---|
29 | { |
---|
30 | case SIGABRT: |
---|
31 | { |
---|
32 | block[0] = ADP_Stopped_RunTimeError; |
---|
33 | break; |
---|
34 | } |
---|
35 | default: |
---|
36 | { |
---|
37 | block[0] = ADP_Stopped_ApplicationExit; |
---|
38 | break; |
---|
39 | } |
---|
40 | } |
---|
41 | |
---|
42 | return do_AngelSWI (insn, block); |
---|
43 | #else |
---|
44 | asm ("swi %a0" :: "i" (SWI_Exit)); |
---|
45 | #endif |
---|
46 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.