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

📄 pipe.h

📁 南京航空航天大学开发的一个类Unix和Linux的操作系统,好不好看看就知道了,
💻 H
字号:
#ifndef _KERNPIPE_H#define _KERNPIEP_H#include <kern/fdes.h>#include <lib/fifoq.h>#include <kern/sched.h>struct pipe_t : protected fifoq_t {	waitq_t waitq;	char * page;	int nreader;	int nwriter;	pipe_t();	~pipe_t();	void rhold() { nreader++; }	void whold() { nwriter++; }	void rlose();	void wlose();	int read(void * buf, int count);	int write(void * buf, int count);};struct pipefd_t : public fdes_t {	pipe_t * pipe;	pipefd_t(int flags, pipe_t * p)	{		type = PIPEFD;		fdflags = flags;		refcnt = 1;		pipe = p;	}	~pipefd_t();	int read(void * buf, int count);	int write(void * buf, int count);	int lseek(off_t off, int whence);	int ioctl(int cmd, ulong arg); 	int readdir(dirent_t * de, int count);};#endif

⌨️ 快捷键说明

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