X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=platform%2Fposix%2Ffunctions%2F_PDCLIB%2F_Exit.c;fp=platform%2Fposix%2Ffunctions%2F_PDCLIB%2F_Exit.c;h=5c95fca8c03379452931b1fda5beaa6b9e38afb3;hb=a38d56a6a13dbb89022b5448d2d5247f3f99ea41;hp=0000000000000000000000000000000000000000;hpb=81f4c957d2f820d9340d90d5b650cbbed054caa0;p=pdclib.old diff --git a/platform/posix/functions/_PDCLIB/_Exit.c b/platform/posix/functions/_PDCLIB/_Exit.c new file mode 100644 index 0000000..5c95fca --- /dev/null +++ b/platform/posix/functions/_PDCLIB/_Exit.c @@ -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 + +#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