[PATCH v2 19/32] tools/nolibc: add _exit()

Thomas Weißschuh posted 32 patches 8 months, 1 week ago
There is a newer version of this series
[PATCH v2 19/32] tools/nolibc: add _exit()
Posted by Thomas Weißschuh 8 months, 1 week ago
_exit() is the faster variant of exit(), skipping all cleanup actions.
As nolibc does not perform any cleanup anyways, the implementation is
trivial.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Acked-by: Willy Tarreau <w@1wt.eu>
---
 tools/include/nolibc/sys.h | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/tools/include/nolibc/sys.h b/tools/include/nolibc/sys.h
index b04d83a7ec50cad7beb32198d9d47bd9d5873f69..f52e1953020945fb2902d47ad5f7a8e7c2c1c290 100644
--- a/tools/include/nolibc/sys.h
+++ b/tools/include/nolibc/sys.h
@@ -301,11 +301,17 @@ void sys_exit(int status)
 }
 
 static __attribute__((noreturn,unused))
-void exit(int status)
+void _exit(int status)
 {
 	sys_exit(status);
 }
 
+static __attribute__((noreturn,unused))
+void exit(int status)
+{
+	_exit(status);
+}
+
 
 /*
  * pid_t fork(void);

-- 
2.49.0