Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 05 Mar 1999 20:36:50 +0100
From:      Tor.Egge@fast.no
To:        jplevyak@inktomi.com
Cc:        hackers@FreeBSD.ORG
Subject:   Re: aio_read/write pread/pwrite
Message-ID:  <199903051936.UAA15838@midten.fast.no>
In-Reply-To: Your message of "Thu, 4 Mar 1999 16:58:18 -0800"
References:  <19990304165818.A20680@proxydev.inktomi.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> In investigating the lack of pread/pwrite, I found the bug
> report kern/8011, and the patch therein.

NetBSD has allocated some syscall numbers for pread, pwrite, preadv
and pwritev. We should use the same syscall interface (same syscall
numbers and parameter alignment) for those functions. This means that
offset should be 64-bit aligned, as is the case with the lseek system
call.  Extra wrappers in the C library should probably be present
(/usr/src/lib/libc/sys should contain a pread.c and a pwrite.c)

In NetBSD, the prototype for vn_read and vn_write has changed (a 
pointer to an offset and a flag has been added).  That is a cleaner
approach, but requires changes throughout the source tree.

Common parts has also been split out into separate subroutines in NetBSD:

	read, pread     uses dofileread
	readv, preadv   uses dofilereadv
	write, pwrite   uses dofilewrite
	writev, pwritev uses dofilewritev

- Tor Egge


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199903051936.UAA15838>