OSDN Git Service

(split) LDP: Update original to LDP v3.65
[linuxjm/LDP_man-pages.git] / original / man3 / flockfile.3
index af67985..c318cc7 100644 (file)
@@ -1,5 +1,6 @@
 .\" Copyright (C) 2001 Andries Brouwer <aeb@cwi.nl>.
 .\"
+.\" %%%LICENSE_START(VERBATIM)
 .\" Permission is granted to make and distribute verbatim copies of this
 .\" manual provided the copyright notice and this permission notice are
 .\" preserved on all copies.
@@ -19,8 +20,9 @@
 .\"
 .\" Formatted or processed versions of this manual, if unaccompanied by
 .\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
 .\"
-.TH FLOCKFILE 3  2008-08-29 "" "Linux Programmer's Manual"
+.TH FLOCKFILE 3  2013-07-23 "" "Linux Programmer's Manual"
 .SH NAME
 flockfile, ftrylockfile, funlockfile \- lock FILE for stdio
 .SH SYNOPSIS
@@ -41,8 +43,10 @@ Feature Test Macro Requirements for glibc (see
 .ad l
 .sp
 All functions shown above:
+.RS 4
 _POSIX_C_SOURCE\ >=\ 1 || _XOPEN_SOURCE || _BSD_SOURCE ||
 _SVID_SOURCE || _POSIX_SOURCE
+.RE
 .ad b
 .SH DESCRIPTION
 The stdio functions are thread-safe.
@@ -90,9 +94,13 @@ and
 .LP
 The
 .BR flockfile ()
-function waits for \fI*filehandle\fP to be
+function waits for
+.I *filehandle
+to be
 no longer locked by a different thread, then makes the
-current thread owner of \fI*filehandle\fP, and increments
+current thread owner of
+.IR *filehandle ,
+and increments
 the lockcount.
 .LP
 The
@@ -105,16 +113,26 @@ function is a nonblocking version
 of
 .BR flockfile ().
 It does nothing in case some other thread
-owns \fI*filehandle\fP, and it obtains ownership and increments
+owns
+.IR *filehandle ,
+and it obtains ownership and increments
 the lockcount otherwise.
-.SH "RETURN VALUE"
+.SH RETURN VALUE
 The
 .BR ftrylockfile ()
 function returns zero for success
 (the lock was obtained), and nonzero for failure.
 .SH ERRORS
 None.
-.SH "CONFORMING TO"
+.SH ATTRIBUTES
+.SS Multithreading (see pthreads(7))
+The
+.BR flockfile (),
+.BR ftrylockfile (),
+and
+.BR funlockfile ()
+functions are thread-safe.
+.SH CONFORMING TO
 POSIX.1-2001.
 .SH AVAILABILITY
 These functions are available when
@@ -122,5 +140,13 @@ These functions are available when
 is defined.
 They are in libc since libc 5.1.1 and in glibc
 since glibc 2.0.
-.SH "SEE ALSO"
+.SH SEE ALSO
 .BR unlocked_stdio (3)
+.SH COLOPHON
+This page is part of release 3.65 of the Linux
+.I man-pages
+project.
+A description of the project,
+and information about reporting bugs,
+can be found at
+\%http://www.kernel.org/doc/man\-pages/.