-
Notifications
You must be signed in to change notification settings - Fork 683
Add abort ()
to jerry-libc
#141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@ruben-ayrapetyan mentioned in #134 that |
Looks good to me |
@@ -48,18 +48,35 @@ LIBC_UNREACHABLE_STUB_FOR (int raise (int sig_no __attr_unused___)) | |||
#define LIBC_EXIT_ON_ERROR(syscall_ret_val) \ | |||
if ((syscall_ret_val) < 0) \ | |||
{ \ | |||
libc_fatal ("Syscall successful", __FILE__, __FUNCTION__, __LINE__); \ | |||
libc_fatal ("Syscall unsuccessful", __FILE__, __FUNCTION__, __LINE__); \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both messages are confusing, maybe just
libc_fatal ("Syscall", __FILE__, __FUNCTION__, __LINE__);
?
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
Updated according to comment |
Great, |
Added declaration and implementations of
void abort (void)
tojerry-libc. As the linux implementation relies on the
getpid
syscall - which has no arguments -
syscall_0
implementationshave been added as well.
libc_fatal
has been adapted to use the newabort
functioninstead of
exit
. This also made the definition ofLIBC_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