summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_workq.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* remove workq code. its been replaced with tasks.dlg2015-01-271-243/+0
| | | | | | | it has been unused since december, and unhooked from the build since christmas. ok krw@
* add a few sizes to freetedu2014-11-011-3/+3
|
* make workq/taskq runner threads yield when they've hogged the cpublambert2014-10-081-1/+2
| | | | ok deraadt@ dlg@ phessler@
* add a size argument to free. will be used soon, but for now default to 0.tedu2014-07-121-3/+3
| | | | after discussions with beck deraadt kettenis.
* 1 << 31 cleanup. Eitan Adler pointed out that there has been aderaadt2013-11-261-2/+2
| | | | | resurrection of the bad idiom in the tree. sufficient review by miod, kettenis, tedu
* simplify kthread_create(). no more stdargderaadt2013-11-181-2/+2
| | | | ok matthew guenther mikeb
* fix two problems identified by matthew@:dlg2010-08-231-27/+53
| | | | | | | | | | | | | | | | | | 1. though shalt not hold a mutex while sleeping, which kthread_create can do. instead of holding the wq mutex over the kthread_create and increasing the number of running threads after kthread_create succeeds, this counts the thread and drops the mutex before kthread_create. after the call it takes the mutex again and decrements the number of threads if the call failed. 2. if a workq is created during autoconf, the actual thread create is deferred to when the scheduler is running. if the workq is destroyed before then, the wq memory gets freed and then the deferred thread creation will be using freed memory. we now have a workq state variable so we can do the right thing at the different stages of the workqs lifetime. ok matthew@
* when you add a task to a workq, it allocates memory to handle thedlg2009-09-021-16/+20
| | | | | | | | | task and shove it on a list. allocations can fail, so if something that wants to run a task later already has memory to handle the workq task then let it provide it via a new function called workq_queue_task. ok kettenis@
* Remove a semicolon at the end of an if statement that made the threadjsg2009-06-241-2/+2
| | | | | | | waiting for all the workqs to die wakeup more often than it should have. ok dlg@ tedu@
* reintroduce mutexes to workqs for locking.dlg2008-10-301-45/+61
| | | | | | tested by many on many archs including several alpha test. ok tedu@ go for it deraadt@
* when shutting workq threads down, dont try to take the big kerneldlg2008-10-271-2/+1
| | | | | | | lock when we've never given it up. this is a remnant of the mpsafe workq stuff we had that wasnt cleaned up properly. found by and fix tested by oga@
* revert to a pre-mutex state. for unknown reasons, the mutexes do not providetedu2008-02-151-23/+18
| | | | sufficient exclusion on alpha, leading to self-locking panics.
* use a mutex to protect workq. incidentally, this removes the additionaltedu2007-12-131-27/+23
| | | | | creation of threads which may have caused multile syswq threads to start. ok dlg
* remove the DIRECTOK flag. the caller semantics were too weird, and it's atedu2007-11-281-5/+1
| | | | bad idea to have functions that react unpredictably.
* convert crypto thread to workq. add WQ_DIRECTOK flag to workq.tedu2007-11-251-2/+7
| | | | | | combined, this lets us use crypto before the thread is running and therefore cryptoraid can attach nice and early. ok/testing deraadt mbalmer marco
* kill unneeded include;thib2007-06-111-2/+1
| | | | | | (stdarg.h, leftover from the vararg's idea). ok tedu@
* switch the flags argument to the front, requested by arttedu2007-05-311-4/+4
| | | | ok dlg
* add an interface for work queues run from a kernel thread.dlg2007-05-311-0/+206
this type of code is implemented many times already in the kernel, this is a generic version of all those replicated code bases. originally from tedu@ ok tedu@ tom@ deraadt@