mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-28 03:20:34 +08:00
Posix: add '#pragma GCC poison exit'
Generally exit() should not be used on Posix, because it exits the whole program instead of only the task.
This commit is contained in:
@@ -39,7 +39,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include <string.h> /* memset, etc */
|
||||
#include <stdlib.h> /* exit */
|
||||
|
||||
#define oom() exit(-1)
|
||||
// FIXME: this needs to be checked: we need to handle OOM properly instead of just exiting
|
||||
#define oom() system_exit(-1)
|
||||
|
||||
typedef void (ctor_f)(void *dst, const void *src);
|
||||
typedef void (dtor_f)(void *elt);
|
||||
|
||||
Reference in New Issue
Block a user