OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / LDP_man-pages / draft / man3 / sem_post.3
1 '\" t
2 .\" Hey Emacs! This file is -*- nroff -*- source.
3 .\"
4 .\" Copyright (C) 2006 Michael Kerrisk <mtk.manpages@gmail.com>
5 .\"
6 .\" Permission is granted to make and distribute verbatim copies of this
7 .\" manual provided the copyright notice and this permission notice are
8 .\" preserved on all copies.
9 .\"
10 .\" Permission is granted to copy and distribute modified versions of this
11 .\" manual under the conditions for verbatim copying, provided that the
12 .\" entire resulting derived work is distributed under the terms of a
13 .\" permission notice identical to this one.
14 .\"
15 .\" Since the Linux kernel and libraries are constantly changing, this
16 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
17 .\" responsibility for errors or omissions, or for damages resulting from
18 .\" the use of the information contained herein.  The author(s) may not
19 .\" have taken the same level of care in the production of this manual,
20 .\" which is licensed free of charge, as they might when working
21 .\" professionally.
22 .\"
23 .\" Formatted or processed versions of this manual, if unaccompanied by
24 .\" the source, must acknowledge the copyright and authors of this work.
25 .\"
26 .\" Japanese Version Copyright (c) 2006 Akihiro MOTOKI all rights reserved.
27 .\" Translated 2006-04-18, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
28 .\"
29 .TH SEM_POST 3 2009-03-30 "Linux" "Linux Programmer's Manual"
30 .\"O .SH NAME
31 .SH Ì¾Á°
32 .\"O sem_post \- unlock a semaphore
33 sem_post \- ¥»¥Þ¥Õ¥©¤Î¥í¥Ã¥¯¤ò²ò½ü¤¹¤ë
34 .\"O .SH SYNOPSIS
35 .SH ½ñ¼°
36 .nf
37 .B #include <semaphore.h>
38 .sp
39 .BI "int sem_post(sem_t *" sem );
40 .fi
41 .sp
42 .\"O Link with \fI\-lrt\fP or \fI\-pthread\fP.
43 \fI\-lrt\fP ¤Þ¤¿¤Ï \fI\-pthread\fP ¤Ç¥ê¥ó¥¯¤¹¤ë¡£
44 .\"O .SH DESCRIPTION
45 .SH ÀâÌÀ
46 .\"O .BR sem_post ()
47 .\"O increments (unlocks) the semaphore pointed to by
48 .\"O .IR sem .
49 .\"O If the semaphore's value consequently becomes greater than zero,
50 .\"O then another process or thread blocked in a
51 .\"O .BR sem_wait (3)
52 .\"O call will be woken up and proceed to lock the semaphore.
53 .BR sem_post ()
54 ¤Ï¡¢
55 .I sem
56 ¤¬»Ø¤¹¥»¥Þ¥Õ¥©¤ÎÃͤò 1 Áý¤ä¤¹ (¥í¥Ã¥¯¤ò²ò½ü¤¹¤ë)¡£¤½¤Î·ë²Ì¡¢
57 ¥»¥Þ¥Õ¥©¤ÎÃͤϠ0 ¤è¤êÂ礭¤ÊÃͤËÊѲ½¤·¡¢
58 .BR sem_wait (3)
59 ¤ÇÄä»ß¤·¤Æ¤¤¤ëÊÌ¤Î¥×¥í¥»¥¹¤ä¥¹¥ì¥Ã¥É¤¬¸Æ¤Óµ¯¤³¤µ¤ì¡¢
60 ¥»¥Þ¥Õ¥©¤ò¥í¥Ã¥¯¤Ç¤­¤ë¤è¤¦¤Ë¤Ê¤ë¡£
61 .\"O .SH RETURN VALUE
62 .SH ÊÖ¤êÃÍ
63 .\"O .BR sem_post ()
64 .\"O returns 0 on success;
65 .\"O on error, the value of the semaphore is left unchanged,
66 .\"O \-1 is returned, and
67 .\"O .I errno
68 .\"O is set to indicate the error.
69 À®¸ù¤¹¤ë¤È¡¢
70 .BR sem_post ()
71 ¤Ï 0 ¤òÊÖ¤¹¡£¥¨¥é¡¼¤Î¾ì¹ç¡¢¥»¥Þ¥Õ¥©¤ÎÃͤÏÊѹ¹¤»¤º¤Ë¡¢ \-1 ¤òÊÖ¤·¡¢
72 .I errno
73 ¤Ë¥¨¥é¡¼¤ò¼¨¤¹Ãͤò¥»¥Ã¥È¤¹¤ë¡£
74 .\"O .SH ERRORS
75 .SH ¥¨¥é¡¼
76 .TP
77 .B EINVAL
78 .\"O .I sem
79 .\"O is not a valid semaphore.
80 .I sem
81 ¤ÏÍ­¸ú¤Ê¥»¥Þ¥Õ¥©¤Ç¤Ï¤Ê¤¤¡£
82 .TP
83 .B EOVERFLOW
84 .\" Added in POSIX.1-2008 TC1 (Austin Interpretation 213)
85 .\"O The maximum allowable value for a semaphore would be exceeded.
86 °ì¤Ä¤Î¥»¥Þ¥Õ¥©¤Ç»ÈÍѤǤ­¤ëºÇÂçÃͤòĶ¤¨¤Æ¤·¤Þ¤¦¤È¤³¤í¤Ç¤¢¤Ã¤¿¡£
87 .\"O .SH CONFORMING TO
88 .SH ½àµò
89 POSIX.1-2001.
90 .\"O .SH NOTES
91 .SH Ãí°Õ
92 .\"O .BR sem_post ()
93 .\"O is async-signal-safe:
94 .\"O it may be safely called within a signal handler.
95 .BR sem_post ()
96 ¤Ï async-signal-safe ¤Ç¤¢¤ë¡£
97 ¤Ä¤Þ¤ê¡¢¥·¥°¥Ê¥ë¥Ï¥ó¥É¥é¤ÎÃæ¤Ç¤â°ÂÁ´¤Ë¸Æ¤Ó½Ð¤¹¤³¤È¤¬¤Ç¤­¤ë¡£
98 .\"O .SH EXAMPLE
99 .SH Îã
100 .\"O See
101 .\"O .BR sem_wait (3).
102 .BR sem_wait (3)
103 »²¾È¡£
104 .\"O .SH "SEE ALSO"
105 .SH ´ØÏ¢¹àÌÜ
106 .BR sem_getvalue (3),
107 .BR sem_wait (3),
108 .BR sem_overview (7)