mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-17 04:52:59 +01:00
Merge pull request #20419 from benpicco/cpu/native_assert-reval
cpu/native: return error code on failed assertion
This commit is contained in:
commit
047fb8d3c7
@ -18,6 +18,7 @@
|
||||
* @author Oliver Hahm <oliver.hahm@inria.fr>
|
||||
*/
|
||||
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <signal.h>
|
||||
|
||||
@ -25,6 +26,9 @@
|
||||
|
||||
void panic_arch(void)
|
||||
{
|
||||
extern unsigned _native_retval;
|
||||
_native_retval = EINVAL;
|
||||
|
||||
#ifdef DEVELHELP
|
||||
/* since we're atop an Unix-like platform,
|
||||
just use the (developer-)friendly core-dump feature */
|
||||
|
@ -36,6 +36,8 @@
|
||||
#define ENABLE_DEBUG 0
|
||||
#include "debug.h"
|
||||
|
||||
unsigned _native_retval = EXIT_SUCCESS;
|
||||
|
||||
static void _native_sleep(void)
|
||||
{
|
||||
_native_in_syscall++; /* no switching here */
|
||||
@ -75,7 +77,7 @@ void pm_off(void)
|
||||
extern void auto_unmount_vfs(void);
|
||||
auto_unmount_vfs();
|
||||
#endif
|
||||
real_exit(EXIT_SUCCESS);
|
||||
real_exit(_native_retval);
|
||||
}
|
||||
|
||||
void pm_reboot(void)
|
||||
|
Loading…
Reference in New Issue
Block a user