Archives

帖子来自 cnlm2 RSS

Linux 多核心服务器 time 函数 bug

作者: cnlm2 (1 篇文章) 日期: 九月 15, 2010 在 3:38 下午
评论 (1)

最近开发一个模块用到了多线程,也用到了linux下的时间函数 结果发现一个bug,多核心服务器下time函数会突然出现返回比正常时间多4000多秒的情况 我们用的linux操作系统是red hat enterprise linux 5.0,内核版本2.6.18-8.el5 以下是测试程序 #include #include #include using namespace std; void *thr1_fun(void* param) { time_t now, ...

继续 ›

分类: 博客征文专栏, 开放源代码, 服务器