extern struct _PDCLIB_file_t * _PDCLIB_filelist;
-int fflush( struct _PDCLIB_file_t * stream )
+int fflush_unlocked( struct _PDCLIB_file_t * stream )
{
if ( stream == NULL )
{
return _PDCLIB_flushbuffer( stream );
}
}
+
+int fflush( struct _PDCLIB_file_t * stream )
+{
+ flockfile( stream );
+ int res = fflush_unlocked(stream);
+ funlockfile( stream );
+ return res;
+}
#endif