summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_synch.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* change wait message for thrsleep to "thrsleep"tedu2005-12-141-2/+2
|
* stupid me got the cast backwardstedu2005-12-131-2/+2
|
* thrsleep and thrwakeup, cast syscall arg from void * to long.tedu2005-12-131-3/+3
|
* kernel support for threaded processes (rthreads).tedu2005-12-031-5/+88
| | | | | | | | uses rfork(RFTHREAD) to create threads, which are presently processes that are a little more tightly bound together. several new syscalls added to facilitate a userland thread library. all conditional on RTHREADS, currently disabled. ok deraadt
* ansi/deregister.jsg2005-11-281-17/+9
| | | | 'go for it' deraadt@
* Match comments with realitypedro2005-11-151-4/+6
|
* A second approach at fixing the telnet localhost & problemniklas2005-06-171-10/+3
| | | | | | | | | | | | | | (but I tend to call it ssh localhost & now when telnetd is history). This is more localized patch, but leaves us with a recursive lock for protecting scheduling and signal state. Better care is taken to actually be symmetric over mi_switch. Also, the dolock cruft in psignal can go with this solution. Better test runs by more people for longer time has been carried out compared to the c2k5 patch. Long term the current mess with interruptible sleep, the default action on stop signals and wakeup interactions need to be revisited. ok deraadt@, art@
* sched work by niklas and art backed out; causes panicsderaadt2005-05-291-37/+38
|
* This patch is mortly art's work and was done *a year* ago. Art wants to thankniklas2005-05-251-38/+37
| | | | | | | | | | | | | | | | everyone for the prompt review and ok of this work ;-) Yeah, that includes me too, or maybe especially me. I am sorry. Change the sched_lock to a mutex. This fixes, among other things, the infamous "telnet localhost &" problem. The real bug in that case was that the sched_lock which is by design a non-recursive lock, was recursively acquired, and not enough releases made us hold the lock in the idle loop, blocking scheduling on the other processors. Some of the other processors would hold the biglock though, which made it impossible for cpu 0 to enter the kernel... A nice deadlock. Let me just say debugging this for days just to realize that it was all fixed in an old diff noone ever ok'd was somewhat of an anti-climax. This diff also changes splsched to be correct for all our architectures.
* put the scheduler in its own file. reduces clutter, and logically separatestedu2004-07-291-633/+1
| | | | | "put this process to sleep" and "find a process to run" operations. no functional change. ok art@
* move db_show_all_procs to kern_proc.c, proc_printit goes in DDB too.tedu2004-07-251-388/+299
| | | | | shuffle functions around so that scheduler is all together. no real functional changes. ok art@ testing miod@
* This moves access to wall and uptime variables in MI code,tholo2004-06-241-7/+7
| | | | | | | | | | | | | | 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@
* First step towards more sane time handling in the kernel -- this changestholo2004-06-211-1/+2
| | | | | | | | 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@
* Merge error in smp merge. It's a miracle that people haven't noticed theart2004-06-201-2/+2
| | | | | | scheduling errors on non-i386 yet. deraadt@ aaron@ ok
* debranch SMP, have funniklas2004-06-131-105/+164
|
* Merge in a piece of the SMP branch into HEAD.art2004-06-091-7/+102
| | | | | | | | | | | Introduce the cpu_info structure, p_cpu field in struct proc and global scheduling context and various changed code to deal with this. At the moment no architecture uses this stuff yet, but it will allow us slow and controlled migration to the new APIs. All new code is ifdef:ed out. ok deraadt@ niklas@
* having the monotonic thing as DEBUG is not going to get it fixed faster, it is just going to annoy peoplederaadt2004-01-261-2/+2
|
* enough is enough, driving people insane is not nicederaadt2003-12-231-2/+2
|
* print tv_usec fields correctly in reporting conmonotonic timemickey2003-12-231-2/+3
|
* Add a check for time not flowing monotonically and just don't changemillert2003-12-191-5/+10
| | | | | | p->p_rtime in this case instead of zeroing it; based on an idea from nordin@. Also add a printf about microtime() not being monotonic for this case (from miod@) #ifdef DIAGNOSTIC. This version OK otto@
* Fix some sign issues that fell out from the change of rlim_t to unsigned.millert2003-12-151-17/+7
| | | | | | | | Also add a check for a negative result when subtracting microtime(&now) from runtime and simply treat this as zero. This should *not* happen but due to an apparent bug in microtime on dual clock machines, it does. The microtime bug is currently being examined. Based on a diff from miod@ with help from otto@; ok deraadt@ otto@
* workaround a clock tick handling bug that the rlimit code just exposed.deraadt2003-12-151-4/+6
|
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-021-6/+2
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* kill 10 minute non-root suffers stuff. noted that we still have this, byderaadt2003-03-151-8/+2
| | | | matthieu, who noted it now that X is not running as root. ok nordin
* Protect p_priority with splstatclock.art2002-10-151-3/+3
|
* fix header printing in show_all_procsmickey2002-07-241-4/+4
|
* Change all variables definitions (int foo) in sys/sys/*.h to variablemiod2002-07-031-1/+4
| | | | declarations (extern int foo), and compensate in the appropriate locations.
* splassert(IPL_STATCLOCK) mi_switchart2002-06-111-4/+6
|
* First round of __P removal in sysmillert2002-03-141-6/+6
|
* semicolon is not always what it seems, replace w/ a \n in asm labelsmickey2002-03-081-3/+3
|
* Let ltsleep take a const wmesg.art2001-11-111-2/+2
|
* Replace inclusion of <vm/foo.h> with the correct <uvm/bar.h> when necessary.miod2001-11-061-4/+2
| | | | (Look ma, I might have broken the tree)
* Remove a comment that just doesn't make any sense.art2001-09-131-2/+1
|
* Change tsleep into ltsleep.art2001-08-071-6/+33
| | | | | | | | | ltsleep takes an additional argument - a simplelock and unlocks it when it's safe to do so. tsleep now becomes a wrapper around ltsleep. From NetBSD
* remove old vmart2001-06-271-11/+1
|
* cold is in systm.h nowmickey2001-06-241-3/+1
|
* indentation.art2001-05-261-2/+1
|
* Reintroduce wakeup callcsapuntz2001-03-251-1/+8
|
* Print a '*' in front of curproc in ps in ddb.art2001-03-151-2/+3
|
* Add wakeup_n and wakeup_one. wakeup_n will wakeup up to n sleeping processescsapuntz2001-02-271-3/+8
|
* When doing an assertion for phz, just do it once when we set phz,art2001-02-191-2/+2
| | | | not once per process.
* Change the ktrace interface functions from taking the trace vnode to taking theart2000-11-101-7/+7
| | | | traced proc. The vnode is in the proc and all functions need the proc.
* s/principal/priciple/; from netbsdmickey2000-08-031-2/+2
|
* Typo in comment and some cleanup of roundrobin.art2000-07-061-6/+7
|
* Slight optimization of wakeup.art2000-06-271-9/+12
|
* Changes to exit handling.art2000-06-051-1/+2
| | | | | | | | cpu_exit no longer frees the vmspace and u-area. This is now handled by a separate kernel thread "reaper". This is to avoid sleeping locks in the critical path of cpu_exit where we're not allowed to sleep. From NetBSD
* Remove the roundrobin_attempts hack and replace it with per-process schedulingart2000-04-191-17/+69
| | | | | | | flags (much nicer for future smp work). Add two generic functions yield() and preempt(). Use preepmt() in uio when we are told to yield. Based on my idea, code written by Jason Thorpe from NetBSD.
* Don't reinitialize the tsleep and ITIMER_REAL timers all the time.art2000-03-231-4/+2
| | | | The function and the argument never change.
* use the new timeout interface for tsleep.art2000-03-231-5/+7
|
* Adapt roundrobin and schedcpu to the new timeout API.art2000-03-231-12/+37
|