]> pd.if.org Git - pdclib/blob - platform/posix/functions/_PDCLIB/_PDCLIB_Exit.c
PDCLib includes with quotes, not <>.
[pdclib] / platform / posix / functions / _PDCLIB / _PDCLIB_Exit.c
1 /* _PDCLIB_exit( int )
2
3    This file is part of the Public Domain C Library (PDCLib).
4    Permission is granted to use, modify, and / or redistribute at will.
5 */
6
7 /* This is an example implementation of _PDCLIB_exit() fit for use with POSIX
8    kernels.
9 */
10
11 #include <stdlib.h>
12
13 #ifndef REGTEST
14 #include "_PDCLIB_glue.h"
15
16 extern void _exit( int status ) _PDCLIB_noreturn;
17
18 void _PDCLIB_Exit( int status )
19 {
20     _exit( status );
21 }
22
23 #endif
24
25 #ifdef TEST
26 #include "_PDCLIB_test.h"
27
28 int main( void )
29 {
30 #ifndef REGTEST
31     int UNEXPECTED_RETURN = 0;
32     _PDCLIB_Exit( 0 );
33     TESTCASE( UNEXPECTED_RETURN );
34 #endif
35     return TEST_RESULTS;
36 }
37
38 #endif