• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===-- Implementation of quick_exit --------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #include "src/stdlib/quick_exit.h"
10 #include "src/__support/OSUtil/exit.h"
11 #include "src/__support/common.h"
12 #include "src/stdlib/exit_handler.h"
13 
14 // extern "C" void __cxa_finalize(void *);
15 namespace LIBC_NAMESPACE {
16 
17 extern ExitCallbackList at_quick_exit_callbacks;
18 
19 [[noreturn]] LLVM_LIBC_FUNCTION(void, quick_exit, (int status)) {
20   call_exit_callbacks(at_quick_exit_callbacks);
21   internal::exit(status);
22 }
23 
24 } // namespace LIBC_NAMESPACE
25