minix/lib/libc
Ben Gras e8eeebcd47 vfs: mmap support
. libc: add vfs_mmap, a way for vfs to initiate mmap()s.
	  This is a good special case to have as vfs is a slightly
	  different client from regular user processes. It doesn't do it
	  for itself, and has the dev & inode info already so the callback
	  to VFS for the lookup isn't necessary. So it has different info
	  to have to give to VM.
	. libc: also add minix_mmap64() that accepts a 64-bit offset, even
	  though our off_t is still 32 bit now.
	. to support mmap, we need to create new references to FD's (such
	  as an FD) so that the mmapped object can never be removed even if
	  all FD's are closed. To do that we conceptually dup the
	  filedescriptor into a new range that is only visible to the system.
	  So there are FDS_PER_PROCESS fd's, which is more than OPEN_MAX,
	  per process, and user processes can still use up to OPEN_MAX
	  FD's. mmap()ped objects then get extra reference in the invisible
	  range so user processes can't close them. The in-vfs fd_set is
	  of size FDS_PER_PROCESS.
	. On exec() time, try to mmap() in the executable if available.
	  (It is not yet available in this commit.)
	. To support mmap(), add do_vm_call that allows VM to lookup
	  (to ino+dev), do i/o from and close FD's on behalf of other
	  processes.
	. To make this possible, a few functions have 2 more arguments
	  to make the target process explicit (instead of the implicit
	  global fp) and to specify whether the request is from a user
	  process or the system (which implies whether FD's starting at
	  OPEN_MAX are valid). These are close_fd, common_open, actual_llseek,
	  actual_read_write_peek, get_fd and get_filp2.

Change-Id: I831551e45a6781c74313c450eb9c967a68505932
2013-05-27 13:56:54 +00:00
..
arch kernel, libc: signals fixes 2013-02-04 12:03:46 +01:00
atomic Libraries updates and cleanup 2013-01-14 11:36:26 +01:00
cdb Libraries updates and cleanup 2013-01-14 11:36:26 +01:00
citrus VFS: add ability to open files O_CLOEXEC 2013-02-28 10:08:53 +00:00
compat Libraries updates and cleanup 2013-01-14 11:36:26 +01:00
compat-43 Libraries updates and cleanup 2013-01-14 11:36:26 +01:00
db VFS: add ability to open files O_CLOEXEC 2013-02-28 10:08:53 +00:00
dlfcn Libraries updates and cleanup 2013-01-14 11:36:26 +01:00
gdtoa Libraries updates and cleanup 2013-01-14 11:36:26 +01:00
gen utimens(2) system call 2013-04-12 18:55:39 +00:00
gmon Libraries updates and cleanup 2013-01-14 11:36:26 +01:00
hash Libraries updates and cleanup 2013-01-14 11:36:26 +01:00
iconv Toolchain upgrade and portability improvements. 2012-11-15 16:07:29 +01:00
include VFS: implement pipe2 2013-02-28 10:08:53 +00:00
inet Libraries updates and cleanup 2013-01-14 11:36:26 +01:00
isc Libraries updates and cleanup 2013-01-14 11:36:26 +01:00
locale Fixing cross build i386 on minix 2013-01-23 21:03:38 +01:00
md Libraries updates and cleanup 2013-01-14 11:36:26 +01:00
minix Removing obsolete _NBSD_LIBC define 2013-02-26 09:44:24 +00:00
misc Fix signal handling for services on abort/exit 2013-03-07 13:11:31 +01:00
nameser Libraries updates and cleanup 2013-01-14 11:36:26 +01:00
net getifaddrs: add un-namespaced alias 2013-01-24 21:57:15 +00:00
nls Libraries updates and cleanup 2013-01-14 11:36:26 +01:00
pkgconfig Full switch to clang/ELF. Drop ack. Simplify. 2012-02-14 14:52:02 +01:00
quad Libraries updates and cleanup 2013-01-14 11:36:26 +01:00
regex Libraries updates and cleanup 2013-01-14 11:36:26 +01:00
resolv Libraries updates and cleanup 2013-01-14 11:36:26 +01:00
rpc Libraries updates and cleanup 2013-01-14 11:36:26 +01:00
softfloat test66: float smoke test, floating point fixes (arm) 2013-02-20 12:29:37 +00:00
ssp Libraries updates and cleanup 2013-01-14 11:36:26 +01:00
stdio VFS: add ability to open files O_CLOEXEC 2013-02-28 10:08:53 +00:00
stdlib Fix signal handling for services on abort/exit 2013-03-07 13:11:31 +01:00
string Libraries updates and cleanup 2013-01-14 11:36:26 +01:00
sys libc: add adjtime() system call. 2013-04-04 15:04:54 +02:00
sys-minix vfs: mmap support 2013-05-27 13:56:54 +00:00
termios Libraries updates and cleanup 2013-01-14 11:36:26 +01:00
thread-stub Libraries updates and cleanup 2013-01-14 11:36:26 +01:00
time Fixing cross build i386 on minix 2013-01-23 21:03:38 +01:00
tls Libraries updates and cleanup 2013-01-14 11:36:26 +01:00
uuid Libraries updates and cleanup 2013-01-14 11:36:26 +01:00
yp Libraries updates and cleanup 2013-01-14 11:36:26 +01:00
libcincludes.mk Full switch to clang/ELF. Drop ack. Simplify. 2012-02-14 14:52:02 +01:00
Makefile VFS: implement pipe2 2013-02-28 10:08:53 +00:00
Makefile.inc Removing last reference to NETBSDINCLUDES 2012-12-07 13:58:06 +01:00
shlib_version Libraries updates and cleanup 2013-01-14 11:36:26 +01:00