X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=platform%2Fposix%2Ffunctions%2F_PDCLIB%2F_PDCLIB_Exit.c;fp=platform%2Fposix%2Ffunctions%2F_PDCLIB%2F_PDCLIB_Exit.c;h=5c95fca8c03379452931b1fda5beaa6b9e38afb3;hb=1cc4363093c919f79eafac209bb5c41548d3f88f;hp=0000000000000000000000000000000000000000;hpb=5155ca96295a12b4857fc0e6a9629cc43a9a85fa;p=pdclib diff --git a/platform/posix/functions/_PDCLIB/_PDCLIB_Exit.c b/platform/posix/functions/_PDCLIB/_PDCLIB_Exit.c new file mode 100644 index 0000000..5c95fca --- /dev/null +++ b/platform/posix/functions/_PDCLIB/_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