forked from zephyrproject-rtos/zephyr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
abort() is an important runtime function, oftentimes used to signal abnormal execution conditions in generic applications. Worse, they may be used under such circumstances in e.g. compiler support libraries, in which case lack of implementation of this function will lead to link error. Fixes: zephyrproject-rtos#29541 Signed-off-by: Paul Sokolovsky <[email protected]>
- Loading branch information
Showing
3 changed files
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,7 @@ static inline void exit(int status) | |
{ | ||
_exit(status); | ||
} | ||
void abort(void); | ||
|
||
int rand(void); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* | ||
* Copyright (c) 2020 Linaro Limited | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#include <stdlib.h> | ||
#include <zephyr.h> | ||
|
||
void abort(void) | ||
{ | ||
printk("abort()\n"); | ||
k_panic(); | ||
} |