diff options
Diffstat (limited to 'lib/libc/stdio/fflush.3')
| -rw-r--r-- | lib/libc/stdio/fflush.3 | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/libc/stdio/fflush.3 b/lib/libc/stdio/fflush.3 index 890323c42437..e13fc39965cc 100644 --- a/lib/libc/stdio/fflush.3 +++ b/lib/libc/stdio/fflush.3 @@ -32,11 +32,12 @@ .\" @(#)fflush.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd December 25, 2017 +.Dd January 23, 2020 .Dt FFLUSH 3 .Os .Sh NAME .Nm fflush , +.Nm fflush_unlocked , .Nm fpurge .Nd flush a stream .Sh LIBRARY @@ -46,6 +47,8 @@ .Ft int .Fn fflush "FILE *stream" .Ft int +.Fn fflush_unlocked "FILE *stream" +.Ft int .Fn fpurge "FILE *stream" .Sh DESCRIPTION The function @@ -64,6 +67,16 @@ flushes .Em all open output streams. .Pp +The +.Fn fflush_unlocked +function is equivalent to +.Fn fflush , +except that the caller is responsible for locking the stream with +.Xr flockfile 3 +before calling it. +This function may be used to avoid the overhead of locking the stream and to +prevent races when multiple threads are operating on the same stream. +.Pp The function .Fn fpurge erases any input or output buffered in the given |
