⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 common-7-8.h

📁 xen虚拟机源代码安装包
💻 H
字号:
/* common-7-8.h*/#include "aio_setup.h"#include <unistd.h>#define SIZE	512int test_main(void){	char *buf;	int rwfd;	int status = 0, res;	long long limit;	rwfd = open(FILENAME, O_RDWR);		assert(rwfd != -1);	res = ftruncate(rwfd, 0);			assert(res == 0);	buf = malloc(SIZE);				assert(buf != NULL);	memset(buf, 0, SIZE);	limit = LIMIT;	SET_RLIMIT(limit);	status |= attempt_rw(rwfd, buf, SIZE,   limit-SIZE, WRITE, SIZE);	status |= attempt_rw(rwfd, buf, SIZE,   limit-SIZE,  READ, SIZE);	status |= attempt_rw(rwfd, buf, SIZE, 1+limit-SIZE, WRITE, SIZE-1);	status |= attempt_rw(rwfd, buf, SIZE, 1+limit-SIZE,  READ, SIZE-1);	status |= attempt_rw(rwfd, buf, SIZE,        limit, WRITE, -EFBIG);	status |= attempt_rw(rwfd, buf, SIZE,        limit,  READ,      0);	status |= attempt_rw(rwfd, buf,    0,        limit, WRITE,      0);	return status;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -