博客
关于我
c语言中的setjmp和longjmp简介
阅读量:367 次
发布时间:2019-03-04

本文共 852 字,大约阅读时间需要 2 分钟。

setjmp???????????????????longjmp????????setjmp???????????????jump_buf????????????longjmp?????setjmp????????

?????setjmp????????null?????setjmp????????????????????????setjmp???????longjmp?????????????????????????????setjmp?????longjmp????????????setjmp?????????????????????

???????setjmp???????????????if?switch?while?????????????????????????????

???????setjmp?longjmp????

#include 
#include
static jmp_buf jump_buffer;noreturn void a(int count) { ("a(%d) called\n", count); longjmp(jump_buffer, count + 1);}int main(void) { volatile int count = 0; if (setjmp(jump_buffer) != 9) { a(count++); }}

???????setjmp?????????????setjmp?????9?????????a???count?????a????longjmp??????????????setjmp????????????

???????

a(0) calleda(1) calleda(2) calleda(3) calleda(4) calleda(5) calleda(6) calleda(7) calleda(8) called

转载地址:http://pabg.baihongyu.com/

你可能感兴趣的文章
python 基于 wordcloud + jieba + matplotlib 生成词云
查看>>
python 基于detectron或mask_rcnn的mask遮罩区域进行图片截取
查看>>
Python编程:Tkinter图形界面设计(2)
查看>>
Python 基础 - Day 5 Learning Note - 模块 之 标准库:time (1)
查看>>
Python 基础一
查看>>
python 基础操作知识整理总结
查看>>
Python 基础知识点整理与分享,期盼你的交流!
查看>>
python 基础第七篇
查看>>
Python编程:Tkinter图形界面设计(1)
查看>>
Python 基础语法:None
查看>>
Python 基础语法:基本数据类型(一)
查看>>
python编程读取写入excel_Python读取txt内容写入xls格式excel中的方法
查看>>
Python 基础语法:基本数据类型(字典)
查看>>
Python 基础语法:基本数据类型(字符串)
查看>>
Python 基础语法:基本数据类型(集合)
查看>>
Python编程的终极十大工具
查看>>
python 堆排序
查看>>
python编程方式之一-函数式编程
查看>>
python 复习计划
查看>>
Python 多处理 apply_async 永远不会在 Windows 7 上返回结果
查看>>