mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-19 11:04:20 +00:00

No functional changes. Change-Id: I907aa47565af2a6c435a5560041fd2b59e65c25c Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
26 lines
359 B
C
26 lines
359 B
C
/*
|
|
* Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#include <stdlib.h>
|
|
|
|
static void (*exitfun)(void);
|
|
|
|
void exit(int status)
|
|
{
|
|
if (exitfun != NULL)
|
|
(*exitfun)();
|
|
for (;;)
|
|
;
|
|
}
|
|
|
|
int atexit(void (*fun)(void))
|
|
{
|
|
if (exitfun != NULL)
|
|
return -1;
|
|
exitfun = fun;
|
|
|
|
return 0;
|
|
}
|