免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12
最近访问板块 发新帖
楼主: andyY
打印 上一主题 下一主题

pthread_cancel 的问题 [复制链接]

论坛徽章:
0
11 [报告]
发表于 2006-02-08 12:54 |只看该作者
你运行之后是什么结果?
我运行后in f2
f2:join 说明cancel成功了?

论坛徽章:
0
12 [报告]
发表于 2006-02-08 12:56 |只看该作者
printf( "f2: join ok !\n" );

论坛徽章:
0
13 [报告]
发表于 2006-02-08 12:58 |只看该作者
原帖由 andyY 于 2006-2-8 12:56 发表
printf( "f2: join ok !\n" );


我直接运行的你的代码.

in f1
Backup file is  ./2006_1_8-13_3.data
press ...
in f2
f2: join ...
f2: join ok !

以上是运行结果.

论坛徽章:
0
14 [报告]
发表于 2006-02-08 13:03 |只看该作者
不可能吧,是从第一篇copy的吗?

论坛徽章:
1
荣誉版主
日期:2011-11-23 16:44:17
15 [报告]
发表于 2006-02-08 13:03 |只看该作者
原帖由 andyY 于 2006-2-8 13:03 发表
不可能吧,是从第一篇copy的吗?


我的也成功了.

论坛徽章:
0
16 [报告]
发表于 2006-02-08 13:07 |只看该作者
晕! linux 2.4.20 , gcc 3.2.2  ?

论坛徽章:
1
荣誉版主
日期:2011-11-23 16:44:17
17 [报告]
发表于 2006-02-08 13:09 |只看该作者
[root@Ora9i tmp]# uname -r
2.6.9-5.ELsmp
[root@Ora9i tmp]# gcc -v
Reading specs from /usr/lib/gcc/i386-redhat-linux/3.4.3/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-java-awt=gtk --host=i386-redhat-linux
Thread model: posix
gcc version 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)


估计是你内核版本太低. 那个时候系统对pthread库的实现还不完善.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP