blob: 8a5c5c8fdca8f075004fbd7a0ef4131f36a83fc3 [file] [log] [blame]
/**
* Copyright 2019 Google LLC. All Rights Reserved
*
* @file fatal_error.h
*
* @brief Fatal Error Handling
*/
#ifndef CHRE_PLATFORM_AOC_FATAL_ERROR_H_
#define CHRE_PLATFORM_AOC_FATAL_ERROR_H_
#include <cstdlib>
#define FATAL_ERROR_QUIT() \
do { \
chre::preFatalError(); \
abort(); \
} while (0)
namespace chre {
/**
* Do preparation for an impending fatal error including flushing logs.
*
* It must not be possible for FATAL_ERROR() to be called by this function or
* any of its callees.
*/
void preFatalError();
} // namespace chre
#endif // CHRE_PLATFORM_AOC_FATAL_ERROR_H_