summaryrefslogtreecommitdiff
path: root/sys/kern/sysv_shm.c
AgeCommit message (Collapse)Author
2004-07-15Rename structs oipc_perm, omsqid_ds, osemid_ds, oshmid_ds to ipc_perm23,Todd C. Miller
etc to avoid confusion and for consistency with the *35 ones. Remove *n2o functions that don't belong outside of compat.
2004-07-14Move the guts of the {sem,msg,shm}ctl system calls into a new functionTodd C. Miller
which also takes two function pointers for copyin/copyout. For the real syscalls these are just the normal copyin/copyout functions. For the compat routines, these are funtions that convert between the new and old foo_ds structs automagically. OK deraadt@
2004-06-21First step towards more sane time handling in the kernel -- this changesThorsten Lockert
things such that code that only need a second-resolution uptime or wall time, and used to get that from time.tv_secs or mono_time.tv_secs now get this from separate time_t globals time_second and time_uptime. ok art@ niklas@ nordin@
2004-05-03POSIX says the length parameter for semop(2) and shmget(2) should be size_t.Todd C. Miller
Create new syscalls with the correct parameters and add compat versions for the old ones under COMPAT_35.
2004-04-16not a pasto. ok millert@Ted Unangst
2004-02-05Correct a reference counting bug in shmat(2); adapted from FreeBSD.Todd C. Miller
OK deraadt@ tedu@ dhartmei@
2003-12-22Remove duplicated code (pasto)Todd C. Miller
2003-10-12Linux shmat allows lookup of segments that are marked as removed soTodd C. Miller
our Linux compat should too. From marius aamodt eriksen
2003-08-21sys/types.h is not really needed with sys/param.h; ok mickey@Kevin Lo
2003-06-17Sync with share/misc/license.template and add missing DARPA creditTodd C. Miller
where applicable.
2003-06-03Use an ISC-tyle license for all my code; it is simpler and more permissive.Todd C. Miller
2003-05-12Nuke a whole bunch of commons; ok tedu (still more to come *sigh*)Jason Wright
2003-04-14There are two related changes.Artur Grabowski
The first one is an mquery(2) syscall. It's for asking the VM system about where to map things. It will be used by ld.so, read the man page for details. The second change is related and is a centralization of uvm_map hint that all callers of uvm_map calculated. This will allow us to adjust this hint on architectures that have segments for non-exec mappings. deraadt@ drahn@ ok.
2003-01-07xerxes [/home/src/local/millert/sudo/sudo-1.6.7] % vi ↵Todd C. Miller
/usr/src/local/TiVo/Linux/Don't allow s{e,h}mmni to be set > 0xffff via sysctl since that could cause id collisions (the macros in <sys/ipc.h> limit the index to 0xffff). Prompted by a conversation with weingart@
2003-01-06Add a "findremoved" arg to shm_find_segment_by_shmid() similar toTodd C. Miller
NetBSD and allow shmctl() to operate on shm segments that have been marked for removal like other OSes do.
2002-12-17Add my copyright notice.Todd C. Miller
2002-12-17Make SysV-style shared memory and semaphore limits sysctl'able.Todd C. Miller
Instead of allocating a static amount of memory for the data structures via valloc() in allocsys(), allocate things dynamically using pool(9) when possible and malloc(9) when not. The various members of struct seminfo and struct shminfo are in kern.seminfo and kern.shminfo respectively (not all members of kern.seminfo are changable). The data structures used still leave something to be desired but things are not made worse in that respect by this commit.
2002-11-06Eliminate the use of KERN_SUCCESS outside of uvm/Artur Grabowski
Also uvm_map returns KERN_* codes that are directly mapped to errnos, so we can return them instead of doing some attempt to translation. drahn@ "I see no problem" pval@ "makes sense"
2002-10-29Since memory deallocation can't fail, remove the error return fromArtur Grabowski
uvm_unmap, uvm_deallocate and a few other functions. Simplifies some code and reduces diff to the UBC branch.
2002-07-16minor formatting.Artur Grabowski
2002-07-12Fix vm -> uvm in a comment.Artur Grabowski
2002-03-14First round of __P removal in sysTodd C. Miller
2001-12-19UBC was a disaster. It worked very good when it worked, but on someArtur Grabowski
machines or some configurations or in some phase of the moon (we actually don't know when or why) files disappeared. Since we've not been able to track down the problem in two weeks intense debugging and we need -current to be stable, back out everything to a state it had before UBC. We apologise for the inconvenience.
2001-11-28Sync in more uvm changes from NetBSD.Artur Grabowski
This time we're getting rid of KERN_* and VM_PAGER_* error codes and use errnos instead.
2001-11-07Add an alignment argument to uvm_map that specifies an alignment hintArtur Grabowski
for the virtual address.
2001-11-06Replace inclusion of <vm/foo.h> with the correct <uvm/bar.h> when necessary.Miod Vallat
(Look ma, I might have broken the tree)
2001-08-12Don't allocate globals in include files, use extern declarations.Todd C. Miller
Move the actual variables into their respective .c files. As a bonus, remove semmap which is not used.
2001-06-27remove old vmArtur Grabowski
2001-06-22KNFTheo de Raadt
2001-05-16Create COMPAT_25 and move ogetfsstat, ostatfs and ostatfs into it.Todd C. Miller
Create COMPAT_23 and move __osemctl, omsgctl, oshmctl there.
2001-05-05Remove the (vaddr_t) casts inside the round_page and trunc_page macros.Artur Grabowski
We might want to use them on types that are bigger than vaddr_t. Fix all callers that pass pointers without casts.
2001-05-05Get rid of CLSIZE and all related stuff.Artur Grabowski
CLSIZE -> 1 CLBYTES -> PAGE_SIZE OLOFSET -> PAGE_MASK etc. At the same time some archs needed some cleaning in vmparam.h so that goes in at the same time.
1999-11-25Use PAGE_SIZE instead of NBPG.Artur Grabowski
1999-07-08Non UVM vaddr_t/paddr_t fixupTobias Weingartner
1999-06-23Improved sysv shared memory. Works with UVM.Artur Grabowski
Original work done in FreeBSD, but this code was ported from NetBSD by Chuck Cranor.
1999-02-22We don't need a second prototype for shmexitArtur Grabowski
1999-02-07don't include vm_map.h twiceArtur Grabowski
1998-06-14fix compat shmctl/IPC_STATMatthieu Herrb
1998-06-11change ipc.h to use uid_t and friends, and then build compat system calls ↵Theo de Raadt
for the old ushort based ipc.h
1998-05-11const a few more callsTheo de Raadt
1997-02-21shmdt before shmdt (in child) fixTheo de Raadt
1996-09-02shmdt when no mapping is ok, found by christosTheo de Raadt
1996-04-21partial sync with netbsd 960418, more to comeTheo de Raadt
1996-03-03From NetBSD: 960217 mergeNiklas Hallqvist
1995-12-14from netbsd; shmfork does not need to know about vforkTheo de Raadt
1995-10-18initial import of NetBSD treeTheo de Raadt