/*
 * Copyright (C) 2012-2019, Samsung Electronics Co., Ltd.
 *
 * panic() header
 */

#ifndef __PANIC_H__
#define __PANIC_H__

#ifdef __cplusplus
extern "C" {
#endif

#include <stdint.h>

#define GENERAL_PANIC -1
#define MEM_ALLOCATOR_PANIC -2
#define STACK_SMASH_PANIC -3
#define MEMSET_BUFFER_OVERFLOW -4

/*
 * Abnormal process termination. The value of 0xFFFF3024 is returned to the
 * caller.
 * panic_code - an informative panic code. May be displayed in traces if traces
 * are available.
 */
void panic(uint32_t panic_code) __attribute__ ((noreturn));

#ifdef __cplusplus
}
#endif

#endif /* __PANIC_H__ */
