summaryrefslogtreecommitdiff
path: root/sys/kern/kern_synch.c
AgeCommit message (Collapse)Author
2006-10-21tbert sent me a diff to change some 0 to NULLTed Unangst
i got carried away and deleted a whole bunch of useless casts this is C, not C++. ok md5
2005-12-30change thrwakeup to take an argument which specifies how many threadsTed Unangst
to wakeup.
2005-12-22fix memory leak conditions in thrsleep and significantly simplifyTed Unangst
2005-12-14timeout code is not so happy with the negative valuesTed Unangst
2005-12-14change wait message for thrsleep to "thrsleep"Ted Unangst
2005-12-13stupid me got the cast backwardsTed Unangst
2005-12-13thrsleep and thrwakeup, cast syscall arg from void * to long.Ted Unangst
2005-12-03kernel support for threaded processes (rthreads).Ted Unangst
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
2005-11-28ansi/deregister.Jonathan Gray
'go for it' deraadt@
2005-11-15Match comments with realityPedro Martelletto
2005-06-17A second approach at fixing the telnet localhost & problemNiklas Hallqvist
(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@
2005-05-29sched work by niklas and art backed out; causes panicsTheo de Raadt
2005-05-25This patch is mortly art's work and was done *a year* ago. Art wants to thankNiklas Hallqvist
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.
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-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-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-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-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-13debranch SMP, have funNiklas Hallqvist
2004-06-09Merge in a piece of the SMP branch into HEAD.Artur Grabowski
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@
2004-01-26having the monotonic thing as DEBUG is not going to get it fixed faster, it ↵Theo de Raadt
is just going to annoy people
2003-12-23enough is enough, driving people insane is not niceTheo de Raadt
2003-12-23print tv_usec fields correctly in reporting conmonotonic timeMichael Shalayeff
2003-12-19Add a check for time not flowing monotonically and just don't changeTodd C. Miller
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@
2003-12-15Fix some sign issues that fell out from the change of rlim_t to unsigned.Todd C. Miller
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@
2003-12-15workaround a clock tick handling bug that the rlimit code just exposed.Theo de Raadt
2003-06-02Remove the advertising clause in the UCB license which BerkeleyTodd C. Miller
rescinded 22 July 1999. Proofed by myself and Theo.
2003-03-15kill 10 minute non-root suffers stuff. noted that we still have this, byTheo de Raadt
matthieu, who noted it now that X is not running as root. ok nordin
2002-10-15Protect p_priority with splstatclock.Artur Grabowski
2002-07-24fix header printing in show_all_procsMichael Shalayeff
2002-07-03Change all variables definitions (int foo) in sys/sys/*.h to variableMiod Vallat
declarations (extern int foo), and compensate in the appropriate locations.
2002-06-11splassert(IPL_STATCLOCK) mi_switchArtur Grabowski
2002-03-14First round of __P removal in sysTodd C. Miller
2002-03-08semicolon is not always what it seems, replace w/ a \n in asm labelsMichael Shalayeff
2001-11-11Let ltsleep take a const wmesg.Artur Grabowski
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-09-13Remove a comment that just doesn't make any sense.Artur Grabowski
2001-08-07Change tsleep into ltsleep.Artur Grabowski
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
2001-06-27remove old vmArtur Grabowski
2001-06-24cold is in systm.h nowMichael Shalayeff
2001-05-26indentation.Artur Grabowski
2001-03-25Reintroduce wakeup callConstantine Sapuntzakis
2001-03-15Print a '*' in front of curproc in ps in ddb.Artur Grabowski
2001-02-27Add wakeup_n and wakeup_one. wakeup_n will wakeup up to n sleeping processesConstantine Sapuntzakis
2001-02-19When doing an assertion for phz, just do it once when we set phz,Artur Grabowski
not once per process.
2000-11-10Change the ktrace interface functions from taking the trace vnode to taking theArtur Grabowski
traced proc. The vnode is in the proc and all functions need the proc.
2000-08-03s/principal/priciple/; from netbsdMichael Shalayeff
2000-07-06Typo in comment and some cleanup of roundrobin.Artur Grabowski
2000-06-27Slight optimization of wakeup.Artur Grabowski
2000-06-05Changes to exit handling.Artur Grabowski
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