Commit Graph

24 Commits

Author SHA1 Message Date
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 e8f2e051a3 - When requested a semamphore count, the userlands expects the kernel to
return the number of processes waiting on the semaphore. We now maintiain
a count of waiting processes.
- Blocked processes are unblocked "first in, first out". We now have a
queue of waiting processes on a asemaphores, so that we can wakeup the
first blocked process.

Problems:
- We now have a lot of dynamic memory allocation, it may be a bit slow.
- Nothing is SMP safe for now. We need to add locks.
- On close, we forget about a semaphore, which is incorrect. One process
  can close its fd attached on a semaphore, but other processes  would carry
  on using it. Since any process can join a shared arena, this is not an
  easy thing to solve.
- A lot of usema/usync functionnalities are still to be discovered.
2002-05-26 21:37:12 +00:00
manu 36b681f651 Added a void framework for usync_cntl(), which is another undocumented IRIX
system call.
2002-04-29 14:40:23 +00:00
manu ee5b3b3977 Added a void IRIX /dev/usema and /dev/usemaclone pseudodevice driver.
IRIX uses this for implementing atomics operation on semaphores

This will be filled later.
2002-04-23 05:51:14 +00:00
manu 0e9a3e0d43 - We now use irix_sys_mmap instead of svr4_sys_mmap
- 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
2002-04-22 05:58:46 +00:00
manu 5261d673c9 Added getpgrp/setpgrp.
setpgrp is stolen from compat/sunos. It should probbaly be moved to
/compat/common
2002-04-16 20:15:47 +00:00
christos ac29fb3782 make signal array handling uniform, and put signal arrays in a separate
file. This is simular to errno array handling.
2002-03-31 22:22:43 +00:00
manu 431e4d2b95 Added enough of swaptcl() command emulation to get swap -l working. This
is needed by acad (it exec's swap -l to check if swap is enabled)
2002-03-16 13:29:42 +00:00
manu cdab2861e2 Added the IRIX /dev/kmem emulation pseudodevice driver 2002-03-15 17:21:26 +00:00
manu cb99a5f48e Implements SIOCNREAD ioctl (some kind of FIONREAD for sockets only). This
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...
2002-03-03 20:12:17 +00:00
manu 457750dabf Implemented irix_sys_systeminfo() 2002-02-17 22:49:53 +00:00
manu 3b176652b8 Fixed wrong file name. 2002-01-06 21:43:10 +00:00
manu 365eb49355 Added compat/irix/irix_syscallnames.c 2002-01-06 21:34:30 +00:00
manu 0d7961013d Added irix_sys_lseek64() 2001-12-25 16:40:48 +00:00
manu b8f46be2f6 Added getdents/ngetdents. 2001-12-23 20:15:03 +00:00
manu aa8fce41ef implemented enough of getmountid to make commands using IRIX Universal Name
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
2001-12-22 14:43:43 +00:00
manu 4d54359755 Implemented irix_sys_xstat(). This duplicates some code already present
for svr4 compat, maybe these should be merged..
2001-12-08 18:08:04 +00:00
manu e3824c6c59 Added IRIX signal delivery 2001-12-08 11:17:37 +00:00
manu 77fa6038d9 Added errno translation 2001-12-02 16:16:57 +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
manu e2898fe96b Added a bit of sysmp() emulation necessary for dynamic linking. 2001-12-02 08:30:10 +00:00
manu 7839e13a9c On IRIX, the first 88 system calls are quite plain SVR4, and the 137
remaining are IRIX specific. We know use SVR4 emulation for the first 88
system calls.
2001-11-28 12:00:53 +00:00
manu be8254f3a8 Added code to match IRIX N32 binaries 2001-11-26 21:36:24 +00:00
manu e7a3ba084e Empty framework for upcoming work on IRIX_COMPAT 2001-09-22 18:51:35 +00:00