set_jmp
来自cppreference.com
|
|
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
| Defined in header <setjmp.h>
|
||
| #define setjmp(env) /* implementation-defined */ |
||
env类型jmp_buf到一个变量保存当前的执行上下文。这个变量可以在以后用来恢复当前的执行上下文longjmp功能。即,当呼叫longjmp功能,继续执行在特定呼叫站点构造jmp_buf变量传递到longjmp。在这种情况下,setjmp回报寿值传递给longjmpOriginal:
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.
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.
You can help to correct and verify the translation. Click here for instructions.
如果非本地跳转非零值。在相同的返回值传递给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.
You can help to correct and verify the translation. Click here for instructions.
[编辑] 为例
| 本节是不完整的 原因: no example |
[编辑] 另请参阅
| 跳转到指定的位置 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. (函数) | |
| C++ documentation for setjmp
| |