六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 27|回复: 0

poll select

[复制链接]

升级  0.65%

321

主题

321

主题

321

主题

探花

Rank: 6Rank: 6

积分
1013
 楼主| 发表于 2013-1-26 12:38:20 | 显示全部楼层 |阅读模式
aio相关
http://lse.sourceforge.net/io/aio.html

jfs
http://en.wikipedia.org/wiki/JFS_(file_system)
xfs
http://xfs.org/index.php/XFS_Papers_and_Documentation
------------javaeye挂了还是升级升的不支持chrome14---页面错乱发布了新的
参考http://frenchleaf.iteye.com/blog/779086
apue12章 :
非阻塞io,
1.如果是调用o p e n以获得该描述符,则可指定O_NONBLOCK标志
2.对于已经打开的一个描述符,则可调用f c n t l打开O_NONBLOCK文件状态标志
源码指向fig14.1:/apue.2e/advio/nonblockw.c
./nonblockw </etc/termcap >temp.file
#include "apue.h"#include <errno.h>#include <fcntl.h>char    buf[500000];intmain(void){        int             ntowrite, nwrite;        char    *ptr;        ntowrite = read(STDIN_FILENO, buf, sizeof(buf));        fprintf(stderr, "read %d bytes\n", ntowrite);        set_fl(STDOUT_FILENO, O_NONBLOCK);      /* set nonblocking */        ptr = buf;        while (ntowrite > 0) {                errno = 0;                nwrite = write(STDOUT_FILENO, ptr, ntowrite);                fprintf(stderr, "nwrite = %d, errno = %d\n", nwrite, errno);                if (nwrite > 0) {                        ptr += nwrite;                        ntowrite -= nwrite;                }        }        clr_fl(STDOUT_FILENO, O_NONBLOCK);      /* clear nonblocking */        exit(0);}
flock锁:
fig14.6 -> lib/locktest.c
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表