自护意识

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2013年3月31日

摘要: 1.线程的创建(pthread_create)2.线程的退出(pthread_exit)3.等待线程结束(pthread_join)4.线程的分离(pthread_detach)5.获取当前线程(pthread_self)1.线程的创建: 函数的原型如下:int pthread_create(pthread_t* thread, pthread_attr_t* attr, void* (*start_routine) (void*), void * arg);第一个参数为pthread_t类型的指针,用来存放创... 阅读全文
posted @ 2013-03-31 11:04 自护意识 阅读(250) 评论(0) 推荐(0) 编辑

摘要: 遇到的问题,pthread_create未声明。解决方法为:Project->Properties->C/C++ Build->Settings->GCC C++ Linker->Libraries在Libraries(-l)中添加pthread即可在Libraries search path(-L)中添加crypto即可Eclipse + CDT:pthread_create函数编译时报错:undefined reference to `pthread_create’undefined reference to `pthread_create’undefined 阅读全文
posted @ 2013-03-31 09:37 自护意识 阅读(881) 评论(0) 推荐(0) 编辑

摘要: 在这个分类下记录毕业设计的路程吧。做好笔记!使用的系统是:ubuntu 11.10,代码选择C++实现,选择eclipse作为IDE。 阅读全文
posted @ 2013-03-31 09:17 自护意识 阅读(266) 评论(0) 推荐(0) 编辑