2 //===----------------------------------------------------------------------===//
4 // The LLVM Compiler Infrastructure
6 // This file is dual licensed under the MIT and the University of Illinois Open
7 // Source Licenses. See LICENSE.TXT for details.
9 //===----------------------------------------------------------------------===//
13 _LIBCPP_SAFE_STATIC static std::new_handler __new_handler;
16 set_new_handler(new_handler handler) _NOEXCEPT
18 return __libcpp_atomic_exchange(&__new_handler, handler);
22 get_new_handler() _NOEXCEPT
24 return __libcpp_atomic_load(&__new_handler);