]> pd.if.org Git - pdclib/blob - functions/stdio/funlockfile.c
Namespace cleanliness: Rename all ***_unlocked functions to _PDCLIB_***_unlocked.
[pdclib] / functions / stdio / funlockfile.c
1 /* funlockfile(FILE * )\r
2 \r
3    This file is part of the Public Domain C Library (PDCLib).\r
4    Permission is granted to use, modify, and / or redistribute at will.\r
5 */\r
6 \r
7 #include <stdio.h>\r
8 #include <stdarg.h>\r
9 \r
10 #ifndef REGTEST\r
11 #include <_PDCLIB_io.h>\r
12 #include <threads.h>\r
13 #include <stdlib.h>\r
14 \r
15 void _PDCLIB_funlockfile( FILE * file )\r
16 {\r
17     int res = mtx_unlock( &file->lock );\r
18     switch(res) {\r
19         case thrd_success:\r
20             return;\r
21 \r
22         default:\r
23             abort();\r
24     }\r
25 }\r
26 \r
27 #endif\r
28 \r
29 #ifdef TEST\r
30 #include <_PDCLIB_test.h>\r
31 \r
32 int main( void )\r
33 {\r
34     // Not tested here - tested by other stdio test drivers\r
35     return TEST_RESULTS;\r
36 }\r
37 \r
38 #endif\r