summaryrefslogtreecommitdiff
path: root/sys/kern
AgeCommit message (Collapse)Author
2004-08-02- check for LK_NOWAIT on vget()Pedro Martelletto
- use ltsleep() instead of the unlock + sleep combo ok art@, inspiration from free/net
2004-08-01leave space for stackgap on growsuppersMichael Shalayeff
2004-07-29proper condition for freeing a page and fix a comment appropriately; art@ ↵Michael Shalayeff
tedu@ ok
2004-07-29put the scheduler in its own file. reduces clutter, and logically separatesTed Unangst
"put this process to sleep" and "find a process to run" operations. no functional change. ok art@
2004-07-28This touches only MI code, and adds new time keeping code. TheThorsten Lockert
code is all conditionalized on __HAVE_TIMECOUNTER, and not enabled on any platforms. adjtime(2) support exists, courtesy of nordin@, sysctl(2) support and a concept of quality for each time source attached exists. High quality time sources exists for PIIX4 ACPI timer as well as some AMD power management chips. This will have to be redone once we actually add ACPI support (at that time we need to use the ACPI interfaces to get at these clocks). ok art@ ken@ miod@ jmc@ and many more
2004-07-28Call dom_dispose() for any SCM_RIGHTS message that went through theTodd C. Miller
read path rather than recv. Previously, if an fd was passed via sendmsg() but was consumed by the receiver via read() the ref count was incremented and never decremented and so the ref count would never reach zero even when there was no long any processes holding the file open (this was especially bad for locked fds). OK markus@ and art@
2004-07-25move db_show_all_procs to kern_proc.c, proc_printit goes in DDB too.Ted Unangst
shuffle functions around so that scheduler is all together. no real functional changes. ok art@ testing miod@
2004-07-22SIMPLELOCK -> mutex for the lock around deadproc list.Artur Grabowski
Also move the whole deadproc infrastructure to kern_exit, it's only used there. miod@ ok
2004-07-22fix cases when m_dup1() returned mbuf chain (instead of single mbuf).Jun-ichiro itojun Hagino
yamt@netbsd
2004-07-22remove p arg from fdplockTed Unangst
2004-07-21In pipe_read, when the pipelock fails (most likely because we catch aArtur Grabowski
signal), don't jump to unlocked_error: and do things that we don't need to do (including messing up the internal state of the pipe). Just return. ok niklas@ miod@
2004-07-21I was wrong. The assymetry created by the proc argument to rw_enter_writeArtur Grabowski
is horrible and doesn't add anything. Remove it. XXX - the fdplock macro will need a separate cleanup. niklas@ markus@ ok
2004-07-20ifdef DDB a few functions only used (or usable) from DDB.Artur Grabowski
2004-07-20The timeout wheels are manipulated by hardclock that's not protected withArtur Grabowski
biglock. We need to protect them with a mutex.
2004-07-20protect printf with a mutex instead of SIMPLELOCK.Artur Grabowski
2004-07-20Introducing mutexes - cpu-owned spinning locks with spl semantics.Artur Grabowski
This is the MI (slightly inefficient and not MP safe) implementation. deraadt@ ok Tested by many. (this and following commits)
2004-07-18return EINVAL if ftruncate(2) is passed a negative offsetAnil Madhavapeddy
ok millert@, miod@, marius@
2004-07-15syncTheo de Raadt
2004-07-153 functions had inexact types; millert okTheo de Raadt
2004-07-15regenTodd C. Miller
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-14regen for new {msg,sem,shm}ctl syscalls.Todd C. Miller
2004-07-14Because mode_t is used in struct ipc_perm we need new versions ofTodd C. Miller
the msgctl, semctl, and shmctl system calls. This moves the old versions to COMPAT_35 and adds new ones. WARNING: While this fixes things like shared memory in the X server for old (pre-mode_t change) binaries, it will break binaries that use shared memory built between the time of the mode_t change (Jul 13th) and now. If you rebuild X during that interval you will need to do it again after updating the rest of userland.
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-07-14regenTodd C. Miller
2004-07-14fhstat(2) uses struct stat too and so needs replacing as well.Todd C. Miller
OK miod@
2004-07-13regen after stat/mode_t/nlink_t changesTodd C. Miller
2004-07-13Change mode_t and nlink_t from 16bit to 32bit. This allows us toTodd C. Miller
use mode_t in syscalls.master and to use mode_t in more places in the kernel. It also makes lint much more useful on kernel code. I've also added a placeholder for st_birthtime to make a UFS2 import easier at some future date. Requested by and OK deraadt@
2004-07-11save an (eventually existent) namei process context when going overPedro Martelletto
symbolic links. fixes pr 3842, ok tedu@, art@
2004-07-09regenTodd C. Miller
2004-07-09Rename ostat -> stat43 to disambiguate from upcoming struct stat changes.Todd C. Miller
Idea from NetBSD, OK deraadt@
2004-07-09go away staticsNiklas Hallqvist
2004-07-07fix an issue when scripts are exec'd under systrace wheremarius eriksen
the argv[0] would be normalized, and hence break scripts that depend on how they were called. this fixes an issue in the ports builds. ok provos@ deraadt@; lots of testing during hackathon sturm@ naddy@
2004-07-04proc_stop needs sched_lock locked. From art, verified with NetBSD.Niklas Hallqvist
2004-07-03if vinvalbuf() fails, unlock the vnode and release it. ok marius@Pedro Martelletto
2004-06-28splhigh around ec_count fetches -- sorry art; ok aaronTheo de Raadt
2004-06-28Add new, generic ``evcount'' event counter API to the kernel. From art@,Aaron Campbell
with modifications from me. Includes code for generic interrupt counter fetching via sysctl. deraadt@ tholo@ drahn@ millert@ ok
2004-06-26Don't sleep forever on short nanosleeps.Thomas Nordin
2004-06-25Instead of accessing ci_dev (that's an MI field), provide a marco thatArtur Grabowski
translates a cpu_info structure into a human-readable cpu number. drahn@ deraadt@ ok
2004-06-24Remove the 8 page limit for sysctl_proc_args after discussing with Theo.Todd C. Miller
Add trivial support for passing a NULL pointer for the argv buffer; currently just returns ARG_MAX for KERN_PROC_ARGV and KERN_PROC_ENV.
2004-06-24This moves access to wall and uptime variables in MI code,Thorsten Lockert
encapsulating all such access into wall-defined functions that makes sure locking is done as needed. It also cleans up some uses of wall time vs. uptime some places, but there is sure to be more of these needed as well, particularily in MD code. Also, many current calls to microtime() should probably be changed to getmicrotime(), or to the {,get}microuptime() versions. ok art@ deraadt@ aaron@ matthieu@ beck@ sturm@ millert@ others "Oh, that is not your problem!" from miod@
2004-06-23a few fixes to systracemarius eriksen
- add an exec message so that whenever a set-uid/gid process exec's a new image which we may control, the exec does not go by unnoticed. - take special care to check for P_SUGIDEXEC as well as P_SUGID, corresponding to the same changes that were made in the ptrace code a while ago ok niels@, sturm@; thanks to naddy for testing
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-06-20Another merge error from smp branch.Artur Grabowski
Found by otto@drijf.net deraadt@ ok
2004-06-20Merge error in smp merge. It's a miracle that people haven't noticed theArtur Grabowski
scheduling errors on non-i386 yet. deraadt@ aaron@ ok
2004-06-20Fix inversed logic in handling the "nowait/waitok" flags. Bugs in two placesArtur Grabowski
in malloc_debug. Also, add an assert-like function to sprinkle in code you're debugging at the moment. Those asserts are _not_ supposed to be ever comitted, just use them while debugging. beck@ ok
2004-06-16export cpu# instead of apid#; art okTheo de Raadt
2004-06-13regenNiklas Hallqvist
2004-06-13debranch SMP, have funNiklas Hallqvist
2004-06-11vm->vm_minsaddr was uninitialized (nothing realy uses it anyway)Michael Shalayeff