07 2010 档案

摘要:问题研讨站:研发技术论坛 http://www.rdeasy.cn/discuss/index.asp?boardid=27 阅读全文
posted @ 2010-07-31 11:07 p2liu 阅读(117) 评论(0) 推荐(0)
摘要:linux下用C开发多线程程序,Linux系统下的多线程遵循POSIX线程接口,称为pthread。 #include int pthread_create(pthread_t *restrict tidp, const pthread_attr_t ... 阅读全文
posted @ 2010-07-30 17:13 p2liu 阅读(166) 评论(0) 推荐(0)
摘要:select()函数主要是建立在fd_set类型的基础上的。fd_set(它比较重要所以先介绍一下)是一组文件描述字(fd)的集合,它用一位来表示一个fd(下面会仔细介绍),对于fd_set类型通过下面四个宏来操作: fd_set set; FD_ZERO(&set); ... 阅读全文
posted @ 2010-07-26 22:21 p2liu 阅读(436) 评论(0) 推荐(0)
摘要:Unix中的函数select和poll用来,支持Unix中I/O复用的功能,在Unix中I/O模型可以分为以一几种: (1)阻塞I/O (2)非阻塞I/O (3)I/O复用(select和poll) (4)信号驱动I/O(SIGIO) (5)异步I/O 其中,现在比较流行的I/O模型是阻塞... 阅读全文
posted @ 2010-07-23 17:38 p2liu 阅读(276) 评论(0) 推荐(0)
摘要:int select(nfds, readfds, writefds, exceptfds, timeout) int nfds; fd_set *readfds, *writefds, *exceptfds; struct timeval *timeout; ndfs:select监... 阅读全文
posted @ 2010-07-23 17:38 p2liu 阅读(374) 评论(0) 推荐(0)