]> pd.if.org Git - pdclib/blobdiff - platform/posix/functions/_PDCLIB/_PDCLIB_Exit.c
* New feature check macro system. See _PDCLIB_aux.h for details
[pdclib] / platform / posix / functions / _PDCLIB / _PDCLIB_Exit.c
diff --git a/platform/posix/functions/_PDCLIB/_PDCLIB_Exit.c b/platform/posix/functions/_PDCLIB/_PDCLIB_Exit.c
new file mode 100644 (file)
index 0000000..5c95fca
--- /dev/null
@@ -0,0 +1,38 @@
+/* $Id$ */
+
+/* _PDCLIB_exit( int )
+
+   This file is part of the Public Domain C Library (PDCLib).
+   Permission is granted to use, modify, and / or redistribute at will.
+*/
+
+/* This is an example implementation of _PDCLIB_exit() fit for use with POSIX
+   kernels.
+*/
+
+#include <stdlib.h>
+
+#ifndef REGTEST
+#include <_PDCLIB_glue.h>
+
+extern void _exit( int status ) _PDCLIB_NORETURN;
+
+void _PDCLIB_Exit( int status )
+{
+    _exit( status );
+}
+
+#endif
+
+#ifdef TEST
+#include <_PDCLIB_test.h>
+
+int main( void )
+{
+    int UNEXPECTED_RETURN = 0;
+    _PDCLIB_Exit( 0 );
+    TESTCASE( UNEXPECTED_RETURN );
+    return TEST_RESULTS;
+}
+
+#endif