OSDN Git Service

2e145b49289ced54b46d9a5314d540f2650180f1
[linuxjm/LDP_man-pages.git] / draft / man3 / unlocked_stdio.3
1 .\" Copyright (C) 2001 Andries Brouwer <aeb@cwi.nl>.
2 .\"
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
6 .\"
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
11 .\"
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein.  The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
18 .\" professionally.
19 .\"
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
22 .\"
23 .\" Japanese Version Copyright (c) 2001 Akihiro MOTOKI
24 .\"         all rights reserved.
25 .\" Translated Fri Nov 2 23:08:42 2001
26 .\"         by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
27 .\"
28 .TH UNLOCKED_STDIO 3  2008-08-29 "" "Linux Programmer's Manual"
29 .\"O .SH NAME
30 .\"O getc_unlocked, getchar_unlocked, putc_unlocked,
31 .\"O putchar_unlocked \- nonlocking stdio functions
32 .SH 名前
33 getc_unlocked, getchar_unlocked, putc_unlocked,
34 putchar_unlocked \- ロックを行わずに標準入出力を行う関数群
35 .\"O .SH SYNOPSIS
36 .SH 書式
37 .nf
38 .B #include <stdio.h>
39 .sp
40 .BI "int getc_unlocked(FILE *" stream );
41 .B "int getchar_unlocked(void);"
42 .BI "int putc_unlocked(int " c ", FILE *" stream );
43 .BI "int putchar_unlocked(int " c );
44 .sp
45 .BI "void clearerr_unlocked(FILE *" stream );
46 .BI "int feof_unlocked(FILE *" stream );
47 .BI "int ferror_unlocked(FILE *" stream );
48 .BI "int fileno_unlocked(FILE *" stream );
49 .BI "int fflush_unlocked(FILE *" stream );
50 .BI "int fgetc_unlocked(FILE *" stream );
51 .BI "int fputc_unlocked(int " c ", FILE *" stream );
52 .BI "size_t fread_unlocked(void *" ptr ", size_t " size ", size_t " n ,
53 .BI "                      FILE *" stream );
54 .BI "size_t fwrite_unlocked(const void *" ptr ", size_t " size ", size_t " n ,
55 .BI "                      FILE *" stream );
56 .sp
57 .BI "char *fgets_unlocked(char *" s ", int " n ", FILE *" stream );
58 .BI "int fputs_unlocked(const char *" s ", FILE *" stream );
59 .sp
60 .B #include <wchar.h>
61 .sp
62 .BI "wint_t getwc_unlocked(FILE *" stream );
63 .B "wint_t getwchar_unlocked(void);"
64 .BI "wint_t fgetwc_unlocked(FILE *" stream );
65 .BI "wint_t fputwc_unlocked(wchar_t " wc ", FILE *" stream );
66 .BI "wint_t putwc_unlocked(wchar_t " wc ", FILE *" stream );
67 .BI "wint_t putwchar_unlocked(wchar_t " wc );
68 .BI "wchar_t *fgetws_unlocked(wchar_t *" ws ", int " n ", FILE *" stream );
69 .BI "int fputws_unlocked(const wchar_t *" ws ", FILE *" stream );
70 .fi
71 .sp
72 .in -4n
73 .\"O Feature Test Macro Requirements for glibc (see
74 .\"O .BR feature_test_macros (7)):
75 glibc 向けの機能検査マクロの要件
76 .RB ( feature_test_macros (7)
77 参照):
78 .ad l
79 .in
80 .sp
81 .BR getc_unlocked (),
82 .BR getchar_unlocked (),
83 .BR putc_unlocked (),
84 .BR putchar_unlocked ():
85 .RS 4
86 _POSIX_C_SOURCE\ >=\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE ||
87 _BSD_SOURCE || _SVID_SOURCE
88 .RE
89 .sp
90 .BR clearerr_unlocked (),
91 .BR feof_unlocked (),
92 .BR ferror_unlocked (),
93 .BR fileno_unlocked (),
94 .BR fflush_unlocked (),
95 .BR fgetc_unlocked (),
96 .BR fputc_unlocked (),
97 .BR fread_unlocked (),
98 .BR fwrite_unlocked ():
99 .RS 4
100 _BSD_SOURCE || _SVID_SOURCE
101 .RE
102 .sp
103 .BR fgets_unlocked (),
104 .BR fputs_unlocked (),
105 .BR getwc_unlocked (),
106 .BR getwchar_unlocked (),
107 .BR fgetwc_unlocked (),
108 .BR fputwc_unlocked (),
109 .BR putwchar_unlocked (),
110 .BR fgetws_unlocked (),
111 .BR fputws_unlocked ():
112 .RS 4
113 _GNU_SOURCE
114 .RE
115 .ad b
116 .\"O .SH DESCRIPTION
117 .SH 説明
118 .\"O Each of these functions has the same behavior as its counterpart
119 .\"O without the "_unlocked" suffix, except that they do not use locking
120 .\"O (they do not set locks themselves, and do not test for the presence
121 .\"O of locks set by others) and hence are thread-unsafe.
122 .\"O See
123 .\"O .BR flockfile (3).
124 これらの関数は、末尾に "_unlocked" がついていない関数と同じ動作をするが、
125 ファイルのロックを使用しない点が異なる。(これらの関数自身はファイルのロック
126 をセットせず、他の関数によってロックがセットされているかどうかのチェックも
127 行わない) それゆえ、スレッド(thread)で安全に使用することができない。
128 .BR flockfile (3)
129 を参照のこと。
130 .\"O .SH "CONFORMING TO"
131 .SH 準拠
132 .\"O The four functions \fIgetc_unlocked\fP(),
133 .\"O .BR getchar_unlocked (),
134 .\"O .BR putc_unlocked (),
135 .\"O .BR putchar_unlocked ()
136 .\"O are in POSIX.1-2001.
137 .BR getc_unlocked (),
138 .BR getchar_unlocked (),
139 .BR putc_unlocked (),
140 .BR putchar_unlocked ()
141 の 4 つの関数は
142 POSIX.1-2001 に規定されている。
143
144 .\"O The nonstandard
145 .\"O .BR *_unlocked ()
146 .\"O variants occur on a few UNIX systems, and are available in recent glibc.
147 非標準の
148 .BR *_unlocked ()
149 の仲間は 2、3 の UNIX システムで定義されており、
150 最近の glibc では使用可能であるが、
151 .\" E.g., in HP-UX 10.0. In HP-UX 10.30 they are called obsolescent, and
152 .\" moved to a compatibility library.
153 .\" Available in HP-UX 10.0: clearerr_unlocked, fclose_unlocked,
154 .\" feof_unlocked, ferror_unlocked, fflush_unlocked, fgets_unlocked,
155 .\" fgetwc_unlocked, fgetws_unlocked, fileno_unlocked, fputs_unlocked,
156 .\" fputwc_unlocked, fputws_unlocked, fread_unlocked, fseek_unlocked,
157 .\" ftell_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
158 .\" getw_unlocked, getwc_unlocked, getwchar_unlocked, putc_unlocked,
159 .\" putchar_unlocked, puts_unlocked, putws_unlocked, putw_unlocked,
160 .\" putwc_unlocked, putwchar_unlocked, rewind_unlocked, setvbuf_unlocked,
161 .\" ungetc_unlocked, ungetwc_unlocked.
162 .\"O They should probably not be used.
163 これらの関数は使わない方がよいだろう。
164 .\"O .SH "SEE ALSO"
165 .SH 関連項目
166 .BR flockfile (3),
167 .BR stdio (3)