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

Thomas Weißschuh posted 32 patches 9 months, 2 weeks ago
There is a newer version of this series
[PATCH 19/32] tools/nolibc: add _exit()
Posted by Thomas Weißschuh 9 months, 2 weeks 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>
---
 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 e28b26f9c3fe8aeb11dedce5106e52228b753e37..d98515120785223aaf74d1848a0ad68e308d6893 100644
--- a/tools/include/nolibc/sys.h
+++ b/tools/include/nolibc/sys.h
@@ -302,11 +302,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.48.1