private area called PRDA that remains unshared. We implement this by using
different vmspace for each share group member, and keeping the memory
appings in sync on each mmap/munmap/mprotect/break...
We use irix_saddr_sync_vmcmd and irix_saddr_sync_syscall to apply a
vmcmd or a syscall to all share group member, this makes the job a bit
easier.
Also implements {get|set}rlimit{64}.
- First implementation of procblk(). THis is supposed to suspend processes.
We emulate this by sending a SIGSTOP, which is not very accurate since
on IRIX, sending a SIGCONT to a process suspended by procblk() will not
resume it.
- support for shared groups
successfully emulates a few test program that use poll semaphores,
including the attach-to-file-descriptor-and-select feature.
There are a few issues:
1) at least one ioctl need to set retval. We handle this in irix_sys_ioctl()
by replacing the data argument by a pointer to a strucutre in the stackgap
that carries the real data and retval. The underlying ioctl methods can
therefore retreive both data and retval.
2) usemaclone is a cloning device: each time it is open, it creates a new
context, and ioctl operation on each open file descriptor will lead to
different behavior. This functionnality is available in NetBSD through the
devvp branch. This first implementation does not use devvp yet, but this
should be done later. Currently, we create a new vnode, and we provide our
own vnode operations. Some operation are applied to the cloned vnode, others
are applied to the original vnode. The v_data field is used to hold a
reference to the original vnode so that we can work on it.
3) at least the setattr vnode operation needs some customisation: IRIX
libc relies on the fact that fchmod on /dev/usema will return 0 in case
of failure.
- initial support for MAP_AUTOGROW flag. When mapping beyond the end of file is
requested with MAP_AUTOGROW, if pages beyond the end of file are touched, the
file should be resized. We are not able to emulate this yet, so we immediatly
resize the file to fit the whole mapping.
- implements mmap64
- the signal trampoline address is given to the kernel by a sigaction()
fourth argument
- we introduce an irix_emuldata structure to keep track of the signal
trampoline address
- we don't support per-sigaction signal trampolines, we only do per-process
- now that we use the IRIX libc signal trampoline, we do not have to handle
the errno update from the signal trampoline
- it is possible that IRIX 5 signal delivery works too, since theses binaries
will come with their own signal trampoline
when SA_SIGINFO is used. The IRIX process will hence find the expected
information using the third argument of the signal handler.
We do not provide code and siginfo yet.
makes X11 binaries able to actually work: most of them were previously hang
in infinite loop wiaiting for data from the X server because SIOCNREAD
reported that some data where to be read whereas the X server had nothing
to say.
Tested (and works): xlogo, xterm, ghostview (IRIX build). Things are getting
interesting...
- do not save/and restore registers that should not be saved and restore
- do give an accurate sigcontext pointer to the signal handler
- do use the struct sigreturna from IRIX.
This eliminates panics and hangs in certain circonstances
Also some cosmetic changes with tabs usage
Service happy. Code in libc attempts to open files in the ns filesystem, and
then uses getmountid on failure to ensure that the ns filesystem is really
mounted. We don't emulate the ns filesystem yet, but getmountid now correctly
reports that ns is not present.
Note: It seems that the mountid of the ns filesystem should always be
00000005 00000000 00000000 7fff3000