summaryrefslogtreecommitdiff
path: root/sys/kern/kern_timeout.c
AgeCommit message (Collapse)Author
2009-11-04Get rid of __HAVE_GENERIC_SOFT_INTERRUPTS now that all our platforms support it.Mark Kettenis
ok jsing@, miod@
2009-06-02Constipate the second argument to timeout_add_*(). Also, usePhilip Guenthe
nitems() in two places instead of coding the array size and fix a spot of whitespace. ok miod@ blambert@
2009-03-03put back r1.25 (poisoning chain pointers after removing items from theMiod Vallat
wheel). This was safe, except for osiop bugs.
2008-10-22Add timeout_add_msec(), for timeouts in milliseconds.Bret Lambert
Idea and original patch mk@ ok mk@, krw@
2008-07-14Don't lock timeouts in db_show_callout.Artur Grabowski
All cpus are stopped and this cpu blocks all interrupts. It doesn't make sense to grab locks that ddb can then jump past with longjmp. Noticed by Pierre Riteau. I just forgot about the bug until reminded today.
2008-07-11Add timeout_add_{tv,ts,bt,sec,usec,nsec} so that we can add timeoutsBret Lambert
in something other than clock ticks. From art@'s punchlist and (for the time being) not yet used. "you're doing it wrong" art@,ray@,otto@,tedu@ ok art@
2008-01-20Revert 1.25 and do not use _Q_INVALIDATE on timeout structures; beingMiod Vallat
subtly different from CIRCLEQ, it is possible, when emptying the whole timeout chain, to end up with CIRCQ_EMPTY being false, and bad things happen. Back to the drawing board...
2006-07-19Sprinkle some _Q_INVALIDATE love for timeout structures as well; ok otto@Miod Vallat
2006-04-21back out my last commit.David Gwynne
art pointed out that timeout_set is the initializer of timeout structs. this means that the ONQUEUE flag could be set when timeout_set is given freshly allocated memory. my commit suddenly introduced the requirement that you bzero a timeout before initialising it. without the bzero we could generate false positives about the timeout being already queued. art did produce a diff that would walk the queues when the flag was set to see if it really was in the lists, but deraadt considers this too much of a hit.
2006-04-18if you go timeout_set, timeout_add, and then timeout_set again you canDavid Gwynne
screw up the queues that tie all the timeouts together. this makes us panic if we detect that happening. its a lot easier to debug that the weird side effects of broken timeout queues. ok mickey@ kettenis@ deraadt@ pedro@
2004-12-28when panicing from timeout_add being < 0, print the value; ok miodTheo de Raadt
2004-12-12simplify slightly, kill lvalue weirdness that's not ANSI C.Marc Espie
okay nordin@
2004-11-10Diff from art@:Alexander Yurchenko
Update ticks in timeout_hardclock_update to avoid errors in hardclock (this is the third time we mess up here). ticks is only used for timeouts anyway. At the same protect updating ticks with timeout_mutex and be slightly more paranoid in timeout_hardclock_update. ok tdeval@ miod@
2004-07-20The timeout wheels are manipulated by hardclock that's not protected withArtur Grabowski
biglock. We need to protect them with a mutex.
2003-06-03Two term license with approval from nordin@Artur Grabowski
2003-05-17Typos; from Julien Bordet <zejames@greyhats.org>Alexander Yurchenko
Close PR 3262
2003-04-13diff from nordin@ to prevent wraparound on long uptime machines.Ted Unangst
ok art@ deraadt@ miod@ tdeval@
2002-12-08 - Lock the timeout wheel after the diagnostic checks.Artur Grabowski
- show timeout_todo in the ddb command.
2002-03-14First round of __P removal in sysTodd C. Miller
2002-02-15Make rescheduling to a later time faster. ok art@Thomas Nordin
2001-12-22New scalable implementation with constant time add and delete. ok deraadt@Thomas Nordin
2001-09-12Rename timeout_init to timeout_startup to deconfuse a bit.Artur Grabowski
2001-08-23Remove even more leftovers from old timeouts.Artur Grabowski
2001-08-23Remove the old timeout legacy code.Miod Vallat
2001-03-28Add some DIAGNOSTIC checks that panic on some of the common mistakes.Artur Grabowski
2001-03-15Triggered mechanism allows a handler to figure out whether a givenConstantine Sapuntzakis
timeout is actually executing.
2001-02-16typo (incidentally, removed a bogus -k in the cvs file, the updateMarc Espie
will trigger $OpenBSD$ fill-in)
2000-06-20timeout_add: Remove the right timeout when we see that it is on the list.Artur Grabowski
2000-05-08from art@:Michael Shalayeff
in timeout_hardclock_update() check out if there is anything in the timeout queue before calculating the return value. thanks to Adam Rogoyski <rogoyski@cs.utexas.edu> for debugging and testing help.
2000-03-23Provide methods to check if a timeout was initalized and if it is scheduled.Artur Grabowski
2000-03-23Preserve the FIFO order of issued timeouts.Artur Grabowski
2000-03-23New API for timeouts. Replaces the old timeout()/untimeout() API andArtur Grabowski
makes it the callers responsibility to allocate resources for the timeouts. This is a KISS implementation and does _not_ solve the problems of slow handling of a large number of pending timeouts (this will be solved in future work) (although hardclock is now guarateed to take constant time for handling of timeouts). Old timeout() and untimeout() are implemented as wrappers around the new API and kept for compatibility. They will be removed as soon as all subsystems are converted to use the new API.