OSDN Git Service

(split) LDP_man-pages: release ioctl.2 [JM:00378]
[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)