Пространства имён
Варианты
Действия

set_jmp

Материал из cppreference.com

 
 
Коммунальные услуги Программа поддержки
Программа прекращения
Original:
Program termination
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
abort
exit
quick_exit(C++11)
_Exit(C++11)
Взаимодействие с окружающей средой
Original:
Communicating with the environment
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Сигналы
Original:
Signals
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Сигнал типа
Original:
Signal types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
SIGABRT
SIGFPE
SIGILL
SIGINT
SIGSEGV
SIGTERM
Нелокальные переходы
Original:
Non-local jumps
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
setjmp
longjmp
Типы
Original:
Types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
jmp_buf
 
Заголовочный файл <setjmp.h>
#define setjmp(env) /* implementation-defined */
Сохраняет текущий контекст выполнения в переменную env типа jmp_buf. Эта переменная впоследствии могут быть использованы для восстановления текущего контекста исполнения longjmp функции. То есть, при вызове функции longjmp сделано, выполнение продолжается в частности сайте вызов, который построили jmp_buf переменная передается longjmp. В этом случае setjmp возвращается Тхо значение, переданное longjmp.
Original:
Saves the current execution context into a variable env of type jmp_buf. This variable can later be used to restore the current execution context by longjmp function. That is, when a call to longjmp function is made, the execution continues at the particular call site that constructed the jmp_buf variable passed to longjmp. In that case setjmp returns tho value passed to longjmp.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Содержание

[править] Параметры

env -
переменную, чтобы сохранить состояние выполнения программы .
Original:
variable to save the execution state of the program to.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[править] Возвращаемое значение

0 если макрос был вызван исходный код и контекст выполнения был сохранен в env.
Original:
0 if the macro was called by the original code and the execution context was saved to env.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Non-нулевое значение, если нелокальных прыжок был просто выполняется. Возвращается значение в такой же, как передается longjmp.
Original:
Non-zero value if a non-local jump was just performed. The return value in the same as passed to longjmp.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[править] Пример

[править] См. также

переход на указанное место
Original:
jumps to specified location
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(функция) [edit]