8 Commits

Author SHA1 Message Date
Akos Kiss
ff185dc57e Turn assert functionality standard-conforming in jerry-libc
Introducing the `assert.h` public header with the `assert(x)` macro
and already making use of it in jerry-libc sources. These newly
introduced ISO C-conforming features replace the non-conforming
`LIBC_ASSERT` and `LIBC_NDEBUG` at no cost, and they also have the
benefit that we can expose `assert` in a public header and make it
useful to jerry-libc users.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-04-14 11:22:53 +02:00
Akos Kiss
a7f015ef47 Implement raise () in libc
The core functionality (i.e., the equivalent of `kill (getpid (), sig);`)
was already there in the implementation of `abort ()`. Now, it got
factored out to `raise ()` so that others (most importantly,
`__aeabi_ldiv0`) can call and link to it as well.

Also, removed `LIBC_UNREACHABLE_STUB_FOR` macro, as it is not used anymore.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-04-12 22:45:01 +02:00
Peter Gal
f6b875c36c Use __func__ instead of __FUNCTION__
The __FUNCTION__ is not part of the C99/C++11 standard.
So replace all occurrences with the standard __func__.

Side note: GCC 5.1 warns when using -Wpedantic -std=c99
and __FUNCTION__.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-06-09 18:03:42 +02:00
Akos Kiss
d6fb76416a 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
2015-06-02 18:12:29 +02:00
Ruben Ayrapetyan
5e125187e5 Introducing jerry-libc's interface include directory. 2015-03-19 20:55:00 +03:00
Ruben Ayrapetyan
f42faabe89 Fixing style according to rules defined in vera++ scripts. 2015-02-17 19:47:00 +03:00
Ruben Ayrapetyan
a4155f7be8 Fixing cppcheck warnings. 2015-02-17 18:43:48 +03:00
Ruben Ayrapetyan
43ea53b1d7 Jerry is now split to several components: core, libc, plugins.
The components are build independently and then are linked with main module corresponding to target platform.
Core is supposed to be platform-independent, while libc and plugins are dependent on specific architecture / platform.

The commit disables unit tests building and running during precommit.
That is supposed to be fixed in a subsequent commit.

Also, the commit disables building and running valgrind targets during precommit.
Build is supposed to be turned on by an option that should be introduced later.
Valgrind-checked runs are supposed to be performed in asynchronous mode.
2015-02-13 21:54:27 +03:00