OSDN Git Service

(split) Import translated manuals from JM CVS Repository.
[linuxjm/LDP_man-pages.git] / release / man2 / getcontext.2
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 NAKANO Takeo all rights reserved.
24 .\" Translated Sat Dec 15 2001 by NAKANO Takeo <nakano@apm.seikei.ac.jp>
25 .\" Updated 2009-04-13, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v3.20
26 .\"
27 .TH GETCONTEXT 2 2009-03-15 "Linux" "Linux Programmer's Manual"
28 .SH Ì¾Á°
29 getcontext, setcontext \- ¥æ¡¼¥¶¥³¥ó¥Æ¥­¥¹¥È¤ò¼èÆÀ/ÀßÄꤹ¤ë
30 .SH ½ñ¼°
31 .B #include <ucontext.h>
32 .sp
33 .BI "int getcontext(ucontext_t *" ucp );
34 .br
35 .BI "int setcontext(const ucontext_t *" ucp );
36 .SH ÀâÌÀ
37 System V Åª¤Ê´Ä¶­¤Ç¤Ï¡¢
38 \fImcontext_t\fP ¤ª¤è¤Ó \fIucontext_t\fP ¤È¤¤¤¦ 2 ¤Ä¤Î·¿¤È¡¢
39 .BR getcontext (),
40 .BR setcontext (),
41 .BR makecontext (3),
42 .BR swapcontext (3)
43 ¤È¤¤¤¦ 4 ¤Ä¤Î´Ø¿ô¤¬
44 .I <ucontext.h>
45 ¤ÇÄêµÁ¤µ¤ì¤Æ¤ª¤ê¡¢¤¢¤ë¥×¥í¥»¥¹ÆâÉô¤ÇÀ©¸æ²¼¤Ë¤¢¤ëÊ£¿ô¤Î¥¹¥ì¥Ã¥É´Ö¤Ç¡¢
46 ¥æ¡¼¥¶¥ì¥Ù¥ë¤Î¥³¥ó¥Æ¥­¥¹¥ÈÀÚÂؤ¨¤¬¤Ç¤­¤ë¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤ë¡£
47 .LP
48 \fImcontext_t\fP ·¿¤Ï¥Þ¥·¥ó°Í¸¤Ç¡¢³°Éô¤«¤é¤Ï±£Ê䵤ì¤Æ¤¤¤ë¡£
49 \fIucontext_t\fP ·¿¤Ï¹½Â¤ÂΤǡ¢¾¯¤Ê¤¯¤È¤â°Ê²¼¤Î 4 ¤Ä¤Î¥Õ¥£¡¼¥ë¥É¤ò»ý¤Ä¡£
50 .in +4
51 .nf
52
53 typedef struct ucontext {
54     struct ucontext *uc_link;
55     sigset_t         uc_sigmask;
56     stack_t          uc_stack;
57     mcontext_t       uc_mcontext;
58     ...
59 } ucontext_t;
60
61 .fi
62 .in
63 \fIsigset_t\fP ¤È \fIstack_t\fP ¤Ï
64 .I <signal.h>
65 ¤ÇÄêµÁ¤µ¤ì¤Æ¤¤¤ë¡£
66 ¤³¤³¤Ç \fIuc_link\fP ¤Ï¡¢
67 ¸½ºß¤Î¥³¥ó¥Æ¥­¥¹¥È¤¬½ªÎ»¤·¤¿¤È¤­¡¢
68 ³¤¤¤ÆÀÚ¤êÂؤï¤ë¥³¥ó¥Æ¥­¥¹¥È¤Ø¤Î¥Ý¥¤¥ó¥¿¤Ç¤¢¤ë
69 (¸½ºß¤Î¥³¥ó¥Æ¥­¥¹¥È¤¬
70 .BR makecontext (3)
71 ¤ÇÀ¸À®¤µ¤ì¤¿¤â¤Î¤Î¾ì¹ç)¡£
72 \fIuc_sigmask\fP ¤Ï¤³¤Î¥³¥ó¥Æ¥­¥¹¥È¤Ç¥Ö¥í¥Ã¥¯¤µ¤ì¤Æ¤¤¤ë
73 ¥·¥°¥Ê¥ë·²¤Ç¤¢¤ë
74 .RB ( sigprocmask (2)
75 ¤ò¸«¤è)¡£
76 \fIuc_stack\fP ¤Ï¤³¤Î¥³¥ó¥Æ¥­¥¹¥È¤¬ÍѤ¤¤Æ¤¤¤ë¥¹¥¿¥Ã¥¯¤Ç¤¢¤ë
77 .RB ( signalstack (2)
78 ¤ò¸«¤è)¡£
79 \fIuc_mcontext\fP ¤ÏÊݸ¤µ¤ì¤Æ¤¤¤ë¥³¥ó¥Æ¥­¥¹¥È¤Î
80 ¥Þ¥·¥óÆÃÍ­¤Îɽ¸½·Á¼°¤Ç¤¢¤ê¡¢
81 ¤³¤³¤Ë¤Ï¸Æ¤Ó½Ð¤·¤¿¥¹¥ì¥Ã¥É¤Î¥Þ¥·¥ó¥ì¥¸¥¹¥¿¤¬³ÊǼ¤µ¤ì¤ë¡£
82 .LP
83 .BR getcontext ()
84 ´Ø¿ô¤Ï¡¢
85 ¥Ý¥¤¥ó¥¿ \fIucp\fP ¤¬»Ø¤¹¹½Â¤ÂΤò¡¢
86 ¸½ºß¥¢¥¯¥Æ¥£¥Ö¤Ê¥³¥ó¥Æ¥­¥¹¥È¤Ë½é´ü²½¤¹¤ë¡£
87 .LP
88 .BR setcontext ()
89 ´Ø¿ô¤Ï¡¢¥Ý¥¤¥ó¥¿
90 \fIucp\fP ¤¬»Ø¤¹¥æ¡¼¥¶¥³¥ó¥Æ¥­¥¹¥È¤ò¥ê¥¹¥È¥¢¤¹¤ë¡£
91 ¸Æ¤Ó½Ð¤·¤ËÀ®¸ù¤¹¤ë¤ÈÊÖ¤é¤Ê¤¤¡£
92 ¤³¤Î¥³¥ó¥Æ¥­¥¹¥È¤Ï¡¢°ÊÁ°¤Ë
93 .BR getcontext ()
94 ¤Þ¤¿¤Ï
95 .BR makecontext (3)
96 ¤ÇÆÀ¤é¤ì¤¿¤â¤Î¤«¡¢
97 ¤¢¤ë¤¤¤Ï¥·¥°¥Ê¥ë¤ÎÂè»°°ú¿ô¤È¤·¤ÆÍ¿¤¨¤é¤ì¤¿¤â¤Î¤Ë¤Ê¤ë¡£
98 .LP
99 ¥³¥ó¥Æ¥­¥¹¥È¤¬
100 .BR getcontext ()
101 ¤Î¸Æ¤Ó½Ð¤·¤Ë¤è¤Ã¤ÆÆÀ¤é¤ì¤Æ¤¤¤¿¤â¤Î¤Î¾ì¹ç¤Ï¡¢
102 ¥×¥í¥°¥é¥à¤Ï¤³¤Î¸Æ¤Ó½Ð¤·¤«¤éÊ֤ä¿Ä¾¸å¤«¤é¤Î¤è¤¦¤Ë¼Â¹Ô¤ò·Ñ³¤¹¤ë¡£
103 .LP
104 ¥³¥ó¥Æ¥­¥¹¥È¤¬
105 .BR makecontext (3)
106 ¤Î¸Æ¤Ó½Ð¤·¤Ë¤è¤Ã¤ÆÆÀ¤é¤ì¤Æ¤¤¤¿¤â¤Î¤Î¾ì¹ç¤Ï¡¢
107 ¥×¥í¥°¥é¥à¤Î¼Â¹Ô¤Ï¤½¤Î
108 .BR makecontext (3)
109 ¸Æ¤Ó½Ð¤·¤ÎÂèÆó°ú¿ô¤Ç»ØÄꤵ¤ì¤¿´Ø¿ô \fIfunc\fP
110 ¤ò¸Æ¤Ó½Ð¤¹¤«¤¿¤Á¤Ç·Ñ³¤¹¤ë¡£
111 \fIfunc\fP ¤«¤éÊÖ¤ë¤È¡¢
112 .BR makecontext (3)
113 ¸Æ¤Ó½Ð¤·¤ÎÂè°ì°ú¿ô¤Ç»ØÄꤵ¤ì¤Æ¤¤¤¿
114 \fIucp\fP ¹½Â¤ÂΤΠ\fIuc_link\fP ¥á¥ó¥Ð¤Ç·Ñ³¤¹¤ë¡£
115 ¤³¤Î¥á¥ó¥Ð¤¬ NULL ¤À¤Ã¤¿¾ì¹ç¤Ï¡¢¤½¤Î¥¹¥ì¥Ã¥É¤Ï½ªÎ»¤¹¤ë¡£
116 .LP
117 ¥³¥ó¥Æ¥­¥¹¥È¤¬¥·¥°¥Ê¥ë¥Ï¥ó¥É¥é¤Î¸Æ¤Ó½Ð¤·¤Ë¤è¤Ã¤ÆÆÀ¤é¤ì¤Æ¤¤¤¿¤â¤Î¤Î¾ì¹ç¤Ï¡¢
118 ¸Å¤¤É¸½à¤Ë¤è¤ì¤Ð
119 ¡Ö¥×¥í¥°¥é¥à¤Î¼Â¹Ô¤Ï¥·¥°¥Ê¥ë¤Ë¤è¤Ã¤Æ³ä¤ê¹þ¤Þ¤ì¤¿Ì¿Îá¤Î¼¡¤ÎÌ¿Îᤫ¤é·Ñ³¤µ¤ì¤ë¡×¡£
120 ¤·¤«¤·¤³¤Îʸ¤Ï SUSv2 ¤Çºï½ü¤µ¤ì¤¿¤Î¤Ç¡¢
121 ¸½ºß¤ÎȽÃǤϡַë²Ì¤ÏÄêµÁ¤µ¤ì¤Æ¤¤¤Ê¤¤¡×¤Ç¤¢¤ë¡£
122 .SH ÊÖ¤êÃÍ
123 À®¸ù¤¹¤ë¤È¡¢
124 .BR getcontext ()
125 ¤Ï 0 ¤òÊÖ¤·¡¢
126 .BR setcontext ()
127 ¤ÏÊÖ¤é¤Ê¤¤¡£
128 ¼ºÇÔ¤¹¤ë¤È¡¢Î¾¼Ô¤È¤â \-1 ¤òÊÖ¤·¡¢\fIerrno\fP ¤ò¥¨¥é¡¼¤Ë±þ¤¸¤ÆÀßÄꤹ¤ë¡£
129 .SH ¥¨¥é¡¼
130 ÄêµÁ¤µ¤ì¤Æ¤¤¤Ê¤¤¡£
131 .SH ½àµò
132 SUSv2, POSIX.1-2001.
133 POSIX.1-2008 ¤Ç¤Ï¡¢°Ü¿¢À­¤ÎÌäÂ꤫¤é
134 .BR getcontext ()
135 ¤Î»ÅÍͤ¬ºï½ü¤µ¤ì¤¿¡£
136 Âå¤ï¤ê¤Ë¡¢¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤ò POSIX ¥¹¥ì¥Ã¥É¤ò»È¤Ã¤Æ½ñ¤­Ä¾¤¹¤³¤È¤¬
137 ¿ä¾©¤µ¤ì¤Æ¤¤¤ë¡£
138 .SH Ãí°Õ
139 ¤³¤Î¥á¥«¥Ë¥º¥à¤ÎºÇ¸Å¤Î¼ÂÁõ¤Ï¡¢
140 .BR setjmp (3)/ longjmp (3)
141 µ¡¹½¤Ç¤¢¤Ã¤¿¡£
142 ¤³¤ì¤é¤Ë¤Ï¥·¥°¥Ê¥ë¥³¥ó¥Æ¥­¥¹¥È¤Î¼è¤ê°·¤¤¤¬ÄêµÁ¤µ¤ì¤Æ¤¤¤Ê¤«¤Ã¤¿¤Î¤Ç¡¢
143 ¼¡¤ÎÃʳ¬¤Ç¤Ï
144 .BR sigsetjmp (3)/ siglongjmp (3)
145 ¤Î¥Ú¥¢¤¬¸½¤ï¤ì¤¿¡£
146 ¸½ºß¤Îµ¡¹½¤Ç¤Ï¤º¤Ã¤ÈºÙ¤«¤ÊÀ©¸æ¤¬¤Ç¤­¤ë¡£
147 °ìÊý
148 .BR getcontext ()
149 ¤«¤éÊ֤俤Ȥ­¡¢
150 ¤³¤ì¤¬ºÇ½é¤Î¸Æ¤Ó½Ð¤·¤Ç¤¢¤Ã¤¿¤«¡¢
151 ¤½¤ì¤È¤â
152 .BR setcontext ()
153 ¸Æ¤Ó½Ð¤·¤«¤é¤Î¤â¤Î¤Ç¤¢¤ë¤«¤ò
154 ¶èÊ̤¹¤ëÍưפÊÊýË¡¤¬¤Ê¤¯¤Ê¤Ã¤Æ¤·¤Þ¤Ã¤¿¡£
155 ¥æ¡¼¥¶¤Ï¡Ö¤·¤ª¤ê¡×µ¡¹½¤ò¼«Ê¬¤Çºî¤é¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
156 ¥ì¥¸¥¹¥¿ÊÑ¿ô¤Ï (¥ì¥¸¥¹¥¿¤Ï¥ê¥¹¥È¥¢¤µ¤ì¤Æ¤·¤Þ¤¦¤Î¤Ç) ¤³¤ì¤ò¤ä¤Ã¤Æ¤¯¤ì¤Ê¤¤¡£
157 .LP
158 ¥·¥°¥Ê¥ë¤¬È¯À¸¤¹¤ë¤È¡¢
159 ¸½ºß¤Î¥æ¡¼¥¶¥³¥ó¥Æ¥­¥¹¥È¤ÏÊݸ¤µ¤ì¡¢
160 ¥·¥°¥Ê¥ë¥Ï¥ó¥É¥éÍѤΥ³¥ó¥Æ¥­¥¹¥È¤¬¥«¡¼¥Í¥ë¤Ë¤è¤Ã¤ÆÀ¸À®¤µ¤ì¤ë¡£
161 º£¸å¤Ï¥Ï¥ó¥É¥é¤Ë
162 .BR longjmp (3)
163 ¤ò»È¤ï¤»¤Ê¤¤¤³¤È:
164 ¤³¤Î´Ø¿ô¤Î¥³¥ó¥Æ¥­¥¹¥È²¼¤Ç¤ÎÆ°ºî¤ÏÄêµÁ¤µ¤ì¤Æ¤¤¤Ê¤¤¡£
165 Âå¤ï¤ê¤Ë
166 .BR siglongjmp (3)
167 ¤«
168 .BR setcontext ()
169 ¤ò»È¤¦¤³¤È¡£
170 .SH ´ØÏ¢¹àÌÜ
171 .BR sigaction (2),
172 .BR sigaltstack (2),
173 .BR sigprocmask (2),
174 .BR longjmp (3),
175 .BR makecontext (3),
176 .BR sigsetjmp (3)