SETJMP

Section: ¶óÀ̺귯¸® ÇÔ¼ö (3)
Updated: 1997³â 3¿ù 2ÀÏ
Index
Return to Main Contents
 

À̸§

setjmp, sigsetjmp - ºñÁö¿ª Å»Ãâ(non-local goto)À» À§ÇØ ½ºÅà ³»¿ë(stack context)À» ÀúÀåÇÑ´Ù.  

»ç¿ë¹ý

#include <setjmp.h>

int setjmp(jmp_buf env);
int sigsetjmp(sigjmp_buf env, int savesigs);
 

¼³¸í

setjmp()¿Í longjmp()´Â ÇÁ·Î±×·¥ÀÇ ÇÏÀ§ ·¹º§ ·çƾ¿¡¼­ ¸¸³ª´Â ¿À·ù¿Í ÀÎÅÍ·´Æ®¸¦ ó¸®ÇÒ ¶§ À¯¿ëÇÏ´Ù. setjmp()´Â ³ªÁß¿¡ longjmp() ÇÔ¼ö°¡ »ç¿ëÇÒ ¼ö ÀÖµµ·Ï Çϱâ À§ÇØ env¿¡ ½ºÅà ³»¿ë°ú ȯ°æ º¯¼ö¸¦ ÀúÀåÇÑ´Ù. setjmp()¸¦ È£ÃâÇÑ ÇÔ¼ö°¡ ¹ÝȯµÇ¾ú´Ù¸é, ½ºÅà ³»¿ëÀº ¹«È¿ÇÏ°Ô µÈ´Ù. sigsetjmp()´Â setjmp() ÇÔ¼ö¿Í ºñ½ÁÇÏ´Ù. ¸¸ÀÏ savesigs°¡ 0 ÀÌ ¾Æ´Ï¶ó¸é, ºÀ¼âµÈ ½ÅÈ£ ÁýÇÕµéÀº env¿¡ ÀúÀåµÇ°í ¸¸ÀÏ siglongjmp()°¡ env°ú ÇÔ²² ³ªÁß¿¡ ÀÛµ¿µÈ´Ù¸é º¹±¸µÈ´Ù.  

¹Ýȯ°ª

setjmp() ¿Í sigsetjmp() ´Â Á÷Á¢ ¹ÝȯµÈ´Ù¸é 0 ÀÌ ¹ÝȯµÈ´Ù. ±×¸®°í, ÀúÀåµÈ ³»¿ëÀ» »ç¿ëÇÏ´Â longjmp()¿¡¼­ ¹ÝȯµÈ´Ù¸é 0 ÀÌ ¾Æ´Ñ °ªÀ¸·Î ¹ÝȯµÈ´Ù.  

ȣȯ

POSIX, ISO 9899  

ÁÖÀÇ

POSIX¿¡¼­´Â setjmp()°¡ ½ÅÈ£ ³»¿ëÀ» ÀúÀåÇÏ´ÂÁö¿¡ ´ëÇØ ¸í·áÇÏÁö ¾Ê´Ù. (SYSV¿¡¼­´Â ÀúÀåÇÏÁö ¾Ê´Â´Ù. DBD4.3´Â ÀúÀåÇϸç, ±×·¸Áö ¾Ê´Â ÇÔ¼ö _setjmp()°¡ ÀÖ´Ù.) ½ÅÈ£ ¸¶½ºÅ©¸¦ ÀúÀåÇÏ°í ½Í´Ù¸é, sigsetjmp()¸¦ »ç¿ëÇ϶ó. setjmp()¿Í sigsetjmp()´Â ÇÁ·Î±×·¥À» ÀÌÇØÇÏ°í À¯ÁöÇϴµ¥ ¾î·Æ°Ô ¸¸µç´Ù. ´Ù¸¥ ¹æ¹ýÀÌ °¡´ÉÇÏ¸é ±×°ÍÀ» »ç¿ëÇ϶ó.  

°ü·Ã Ç׸ñ

longjmp(3), siglongjmp(3)  

¹ø¿ª

Á¤°­ÈÆ <skyeyes@soback.kornet.net> 2001³â 1¿ù 10ÀÏ
ÇÑ±Û Manpage ÇÁ·ÎÁ§Æ® (http://man.kldp.org) 2004³â 3¿ù 25ÀÏ


 

Index

À̸§
»ç¿ë¹ý
¼³¸í
¹Ýȯ°ª
ȣȯ
ÁÖÀÇ
°ü·Ã Ç׸ñ
¹ø¿ª

This document was created by man2html, using the manual pages.
Time: 01:20:41 GMT, March 26, 2004