brintos

brintos / llvm-project-archived public Read only

0
0
Text · 846 B · 369b07b Raw
24 lines · cpp
1//===-- Windows implementation of an exit function ------------------------===//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-exception6//7//===----------------------------------------------------------------------===//8 9#include "src/__support/macros/config.h"10 11// On Windows we cannot make direct syscalls since Microsoft changes system call12// IDs periodically. We must rely on functions exported from ntdll.dll or13// kernel32.dll to invoke system service procedures.14#define WIN32_LEAN_AND_MEAN15#include <Windows.h>16 17namespace LIBC_NAMESPACE_DECL {18namespace internal {19 20[[noreturn]] void exit(int status) { ::ExitProcess(status); }21 22} // namespace internal23} // namespace LIBC_NAMESPACE_DECL24