LONGJMP
Section: Library functions (3)
Updated: March 2, 1997
Index
Return to Main Contents
À̸§
longjmp, siglongjmp - ºñ-Áö¿ª¿¡¼ ½ºÅà ¹®¸Æ(stack context)ÀÌ ÀúÀåµÈ°÷À¸·Î Á¡ÇÁÇÑ´Ù.
»ç¿ë¹ý
#include <setjmp.h>
void longjmp(jmp_buf env, int val);
void siglongjmp(sigjmp_buf env, int val);
¼³¸í
longjmp()¿Í setjmp()´Â ÇÁ·Î±×·¥ÀÇ ÇÏÀ§-·¹º§ ·çƾ¿¡¼ ¸¸³ª´Â ¿¡·¯¿Í
ÀÎÅÍ·´Æ®¸¦ ó¸®ÇÒ¶§ À¯¿ëÇÑ´Ù.
longjmp()´Â env ÀÎÀÚ¿¡ ´ëÀÀÇÏ´Â °÷¿¡ setjmp()ÀÇ ¸¶Áö¸· È£Ãâ½Ã
ÀúÀåµÈ ȯ°æ º¯¼ö¸¦ º¹±¸ÇÑ´Ù.
longjmp()°¡ ³¡³ ÈÄ, ÇÁ·Î±×·¥ ½ÇÇàÀº setjmp()¿¡ »óÀÀÇϴ ȣÃâÀÌ
val°ªÀ¸·Î ¹ÝȯµÈ °Íó·³ °è¼ÓÇÑ´Ù. longjmp()´Â ¹ÝȯµÇ±â À§ÇØ 0 À¸·Î ÇÒ¼ö´Â
¾ø´Ù.
¸¸ÀÏ longjmp°¡ µÎ¹ø° ÀÎÀÚ¿¡ 0 À» °¡Áö°í È£ÃâµÇ¾ú´Ù¸é, ´ë½Å¿¡ 1ÀÌ ¹ÝȯµÈ´Ù.
siglongjmp()´Â env ÀÎÀÚ Å¸ÀÔÀ» Á¦¿ÜÇÏ°í´Â longjmp()¿Í
ºñ½ÁÇÑ´Ù.
¸¸ÀÏ sigsetjmp()°¡ 0 ÀÌ ¾Æ´Ñ savesigs Ç÷¡±×¸¦ »ç¿ëÇÑ
env¸¦ ¼³Á¤ÇÏ°í È£ÃâµÇ¾ú´Ù¸é,
siglongjmp()´Â ºÀ¼âµÈ ½ÅÈ£ ÁýÇÕµéÀ» º¹±¸ÇÑ´Ù.
¹Ýȯ°ª
ÀÌ ÇÔ¼öµéÀº °áÄÚ ¹ÝȯµÇÁö ¾Ê´Â´Ù.
ȣȯ
POSIX
ÁÖÀÇ
POSIX´Â longjmp°¡ ½ÅÈ£ ¹®¸ÆÀ» ÀúÀåÇÏ´ÂÁö¿¡ ´ëÇØ ¸íÈ®È÷ ÇÏÁö ¾Ê´Â´Ù. ¸¸ÀÏ ¿©·¯ºÐÀÌ ½ÅÈ£ ¸¶½ºÅ©¸¦ ÀúÀåÇÏ°í º¹±¸ÇÏ±æ ¿øÇÑ´Ù¸é,
siglongjmp¸¦ »ç¿ëÇضó.
longjmp()¿Í siglongjmp()´Â ÇÁ·Î±×·¥À» ÀÌÇØÇÏ°í À¯ÁöÇϴµ¥ ¾î·Æ°Ô ¸¸µç´Ù. ¼±ÅÃÇÒ¼ö ÀÖ´Â °ÍÀÌ ÀÖ´Ù¸é, ±×°ÍÀ» »ç¿ëÇØ¾ß ÇÑ´Ù.
°ü·Ã Ç׸ñ
setjmp(3), sigsetjmp(3)
¿ªÀÚ
Á¤°ÈÆ <skyeyes@soback.kornet.net>, 2001³â 1¿ù 10ÀÏ
Index
- À̸§
-
- »ç¿ë¹ý
-
- ¼³¸í
-
- ¹Ýȯ°ª
-
- ȣȯ
-
- ÁÖÀÇ
-
- °ü·Ã Ç׸ñ
-
- ¿ªÀÚ
-
This document was created by
man2html,
using the manual pages.
Time: 08:07:01 GMT, March 25, 2004