Commit Graph

8 Commits

Author SHA1 Message Date
manu eeb799a6c9 Implement MAP_LOCAL option to mmap, which enable the mapping of regions
private to the process within the share group.

There is one bit missing in this implementation: when replicating a change
in a process VM to the other process of the share group, we avoid copying
mappings for private regions in the target process, but we don't prevent
copying private regions from the source process.
2002-10-14 21:14:23 +00:00
manu e9b4436254 Fixed typo in a comment 2002-10-05 23:15:58 +00:00
manu 80ee637534 - Introduce a e_fault field in struct proc to provide emulation specific
memory fault handler. IRIX uses irix_vm_fault, and all other emulation
use NULL, which means to use uvm_fault.

- While we are there, explicitely set to NULL the uninitialized fields in
struct emul: e_fault and e_sysctl on most ports

- e_fault is used by the trap handler, for now only on mips. In order to avoid
intrusive modifications in UVM, the function pointed by e_fault does not
has exactly the same protoype as uvm_fault:
int uvm_fault __P((struct vm_map *, vaddr_t, vm_fault_t, vm_prot_t));
int e_fault __P((struct proc *, vaddr_t, vm_fault_t, vm_prot_t));

- In IRIX share groups, all the VM space is shared, except one page.
This bounds us to have different VM spaces and synchronize modifications
to the VM space accross share group members. We need an IRIX specific hook
to the page fault handler in order to propagate VM space modifications
caused by page faults.
2002-09-21 21:14:54 +00:00
manu 652fe89179 - add locks to structures used by the /dev/usema driver and the
usync_cntl() system calls.

- when usync_cntl is used and the process is aborted (eg: by kill -9)
libc does not call usync_cntl() to unblock things. We have to cleanup
data allocated in the kernel. This is now done through the emulation
specific exit hook

- IRIX initialize some data in the system part of the PRDA: the pid and
a prid (PRDA ID?). We initialize both to pid.

- Move back struct irix_share_group from irix_exec.h to irix_prctl.h, it
is more revelant here.

- fix a few typos
2002-08-25 19:03:12 +00:00
manu 022bd85d32 When sproc is used to create a share group with shared memory, there is a
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}.
2002-06-12 20:33:20 +00:00
manu 55dd8b2806 - Introduce irix_check_exec() to check if a given process is an IRIX one
- 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
2002-06-05 17:27:11 +00:00
manu 3568060679 Implements IRIX sproc(2) and friends.
There may be a problem with stack size overflow in this implementation
2002-04-28 17:21:58 +00:00
manu ef711afc33 Added enough of prctl emulation so that program do not crash on exit 2001-12-02 09:23:58 +00:00