summaryrefslogtreecommitdiffhomepage
path: root/dev/LibC++/base_process.h
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2025-02-03 06:54:19 +0100
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2025-02-03 06:54:19 +0100
commit2ea33083009603610c095ba109c41c4d257b0471 (patch)
tree01c1d682a5e097b8a2df02cc5e69fb4c065f1016 /dev/LibC++/base_process.h
parent00f53a8617584c9dc8a7b5fe4d3f66192c50832d (diff)
META: Tweaks.
Diffstat (limited to 'dev/LibC++/base_process.h')
-rw-r--r--dev/LibC++/base_process.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/dev/LibC++/base_process.h b/dev/LibC++/base_process.h
new file mode 100644
index 0000000..8a7ddc8
--- /dev/null
+++ b/dev/LibC++/base_process.h
@@ -0,0 +1,22 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024 Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+/// @brief CRT exit, with exit code (!!! exits all threads. !!!)
+/// @param code the exit code.
+/// @return the return > 0 for non successful.
+extern "C" int exit(int code);
+
+/// @brief Standard C++ namespace
+namespace std::base_process
+{
+ inline int exit(int code)
+ {
+ exit(code);
+ return -1;
+ }
+} // namespace std::base_process