diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-17 10:52:33 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-17 10:52:33 +0000 |
commit | 2c3307fb903f427be3d021c5780b75cac9af2ce8 (patch) | |
tree | 65cf431f40b7481d81ae2dfce9576342686448f7 /upstream/opensuse-tumbleweed/man3/flockfile.3 | |
parent | Releasing progress-linux version 4.22.0-1~progress7.99u1. (diff) | |
download | manpages-l10n-2c3307fb903f427be3d021c5780b75cac9af2ce8.tar.xz manpages-l10n-2c3307fb903f427be3d021c5780b75cac9af2ce8.zip |
Merging upstream version 4.23.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'upstream/opensuse-tumbleweed/man3/flockfile.3')
-rw-r--r-- | upstream/opensuse-tumbleweed/man3/flockfile.3 | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/upstream/opensuse-tumbleweed/man3/flockfile.3 b/upstream/opensuse-tumbleweed/man3/flockfile.3 index c2a18a42..325a676d 100644 --- a/upstream/opensuse-tumbleweed/man3/flockfile.3 +++ b/upstream/opensuse-tumbleweed/man3/flockfile.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH flockfile 3 2023-07-20 "Linux man-pages 6.05.01" +.TH flockfile 3 2024-05-02 "Linux man-pages (unreleased)" .SH NAME flockfile, ftrylockfile, funlockfile \- lock FILE for stdio .SH LIBRARY @@ -12,17 +12,17 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdio.h> -.PP +.P .BI "void flockfile(FILE *" filehandle ); .BI "int ftrylockfile(FILE *" filehandle ); .BI "void funlockfile(FILE *" filehandle ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P All functions shown above: .nf /* Since glibc 2.24: */ _POSIX_C_SOURCE >= 199309L @@ -41,13 +41,13 @@ For each library call, these functions wait until the object is no longer locked by a different thread, then lock it, do the requested I/O, and unlock the object again. -.PP +.P (Note: this locking has nothing to do with the file locking done by functions like .BR flock (2) and .BR lockf (3).) -.PP +.P All this is invisible to the C-programmer, but there may be two reasons to wish for more detailed control. On the one hand, maybe @@ -55,7 +55,7 @@ a series of I/O actions by one thread belongs together, and should not be interrupted by the I/O of some other thread. On the other hand, maybe the locking overhead should be avoided for greater efficiency. -.PP +.P To this end, a thread can explicitly lock the .I FILE object, @@ -72,7 +72,7 @@ instead of .BR getc (3) and .BR putc (3). -.PP +.P The .BR flockfile () function waits for @@ -83,11 +83,11 @@ current thread owner of .IR *filehandle , and increments the lockcount. -.PP +.P The .BR funlockfile () function decrements the lock count. -.PP +.P The .BR ftrylockfile () function is a nonblocking version @@ -121,12 +121,11 @@ T{ .BR funlockfile () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY POSIX.1-2001. -.PP +.P These functions are available when .B _POSIX_THREAD_SAFE_FUNCTIONS is defined. |