]> pd.if.org Git - pdclib/blob - platform/example/functions/_PDCLIB/_Exit.c
Added no-brainer headers.
[pdclib] / platform / example / functions / _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
15 #include "_PDCLIB_glue.h"
16
17 extern void _exit( int status ) _PDCLIB_NORETURN;
18
19 void _PDCLIB_Exit( int status )
20 {
21     _exit( status );
22 }
23
24 #endif
25
26 #ifdef TEST
27
28 #include "_PDCLIB_test.h"
29
30 int main( void )
31 {
32 #ifndef REGTEST
33     int UNEXPECTED_RETURN = 0;
34     _PDCLIB_Exit( 0 );
35     TESTCASE( UNEXPECTED_RETURN );
36 #endif
37     return TEST_RESULTS;
38 }
39
40 #endif