poll select

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];

int
main(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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值