Add abort () to jerry-libc

Added declaration and implementations of `void abort (void)` to
jerry-libc. As the linux implementation relies on the `getpid`
syscall - which has no arguments - `syscall_0` implementations
have been added as well.

`libc_fatal` has been adapted to use the new `abort` function
instead of `exit`. This also made the definition of
`LIBC_FATAL_ERROR_EXIT_CODE` unnecessary.

Finally, the syscall fatal error message was fixed.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
This commit is contained in:
Akos Kiss
2015-06-02 15:59:42 +02:00
parent 5c012a1183
commit d6fb76416a
10 changed files with 92 additions and 9 deletions
+13
View File
@@ -16,6 +16,19 @@
#ifndef ASM_ARM_H
#define ASM_ARM_H
/*
* mov syscall_no (%r0) -> %r7
* svc #0
*/
#define SYSCALL_0 \
push {r4-r12, lr}; \
\
mov r7, r0; \
\
svc #0; \
\
pop {r4-r12, pc};
/*
* mov syscall_no (%r0) -> %r7
* mov arg1 (%r1) -> %r0