Project

General

Profile

Bug #2357 » 0002-kernel-remove-O_FRNONBLOCKING.patch

ftigeot, 07/29/2012 11:00 AM

View differences:

sys/kern/vfs_vnops.c
vp = (struct vnode *)fp->f_data;
ioflag = 0;
if (flags & O_FRNONBLOCKING) {
ioflag |= (IO_NDELAY | IO_NRDELAY);
} else if (flags & O_FBLOCKING) {
if (flags & O_FBLOCKING) {
/* ioflag &= ~IO_NDELAY; */
} else if (flags & O_FNONBLOCKING) {
ioflag |= IO_NDELAY;
sys/sys/fcntl.h
#define O_FUNBUFFERED 0x01000000 /* force unbuffered (direct) I/O */
#define O_FBUFFERED 0x02000000 /* force buffered I/O */
#define O_MAPONREAD 0x04000000 /* memory map read buffer */
#define O_FRNONBLOCKING 0x08000000 /* nonblocking I/O no disk wait */
#if defined(_KERNEL) || defined(_KERNEL_STRUCTURES)
#define FREVOKED 0x10000000 /* revoked by fdrevoke() */
......
#define O_FMASK (O_FBLOCKING|O_FNONBLOCKING|O_FAPPEND|O_FOFFSET|\
O_FSYNCWRITE|O_FASYNCWRITE|O_FUNBUFFERED|O_FBUFFERED|\
O_MAPONREAD|O_FRNONBLOCKING)
O_MAPONREAD)
#ifdef _KERNEL
/* convert from open() flags to/from fflags; convert O_RD/WR to FREAD/FWRITE */
(2-2/2)