Chinaunix首页 | 论坛 | 博客
  • 博客访问: 65303
  • 博文数量: 43
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 420
  • 用 户 组: 普通用户
  • 注册时间: 2014-06-27 15:04
个人简介

记录,分享

文章分类

全部博文(43)

文章存档

2017年(24)

2015年(1)

2014年(18)

我的朋友

发布时间:2014-06-27 15:42:37

14.2 非阻塞IO对于一个给定的描述符有两种方法对其指定非阻塞IO:1.如果调用open获得描述符,则可指定O_NONBLOCK标志2.对于已经打开的一个描述符,则可调用fcntl,由该函数打开O_NONBLOCK文件状态标志。----------------------------------------------------------------------------14.3 记录锁记录锁的功能:当.........【阅读全文】

阅读(389) | 评论(0) | 转发(0)

发布时间:2014-06-27 15:40:12

12.3  线程属性pthread_attr_t结构指定了线程的属性。可以使用pthread_attr_init将pthread_attr_t初始化为系统默认值。可以使用pthread_attr_destory回收pthread_attr_init分配的底层资源。#include <pthread.h>int pthread_attr_init ( pthread_attr_t *attr );int pthread_attr_destroy ( phtread_attr_t * .........【阅读全文】

阅读(464) | 评论(0) | 转发(0)

发布时间:2014-06-27 15:38:29

11.3  线程标识#include  <pthread.h>int  pthread_equal( pthread_t tid1 , pthread_t  tid2);pthread_t  pthread_self ( void );pthread_equal 比较两个线程id。pthread_self 返回本线程的id。----------------------------------------------------------------------------11.4&nbs.........【阅读全文】

阅读(506) | 评论(0) | 转发(0)

发布时间:2014-06-27 15:28:23

3.2 文件描述符按照惯例,unix系统标准输入流的文件描述符为0,标准输出流的文件描述符为1,标准出错流的文件描述符为2。通常使用<unistd.h>中的常量,STDIN_FILENO,STDOUT_FILENO,STDERR_FILENO来代替幻数0 1 2。--------------------------------------------------------3.3 open函数#include <fcntl.h>int op.........【阅读全文】

阅读(338) | 评论(0) | 转发(0)
给主人留下些什么吧!~~
留言热议
请登录后留言。

登录 注册