History log of /haiku/src/system/kernel/kernel_daemon.cpp
Revision Date Author Comments
# 8f68daed 25-Apr-2022 Augustin Cavalier <waddlesplash@gmail.com>

kernel: Make use of the new ConditionVariable lock-switching APIs in a few places.


# 8c6b1519 10-Aug-2019 Augustin Cavalier <waddlesplash@gmail.com>

kernel/daemon: Sleep as long as possible between runs.

Avoids waking up every 100ms to do nothing.

Change-Id: I48c7be41f6102a76b7e770ea45c665ab991c79f0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1700
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# d3166e46 29-Apr-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Replaced no longer necessary send_signal_etc() work-arounds for
resume_thread().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36531 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2e7bd016 12-Apr-2010 Axel Dörfler <axeld@pinc-software.de>

* The kernel daemon no longer hold its lock when calling the registered hooks.
* This fixes bug #5421.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36209 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8dd44be8 04-Jan-2010 Axel Dörfler <axeld@pinc-software.de>

* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34891 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e8db7400 03-Jan-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Avoid using DoublyLinkedList internals.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34885 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e045a8c0 03-Jan-2010 Axel Dörfler <axeld@pinc-software.de>

* Solved the problem independently from the list.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34876 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 32883e89 03-Jan-2010 Axel Dörfler <axeld@pinc-software.de>

* This should hopefully fix the broken kernel - this code relied on clearing
the next/previous pointers. There might be more, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34875 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c33667d4 01-Feb-2009 Michael Lotz <mmlr@mlotz.ch>

Fixing warnings under GCC4 in preparation to enable -Werror there as well:
* Replaced the use of offsetof() for structs that aren't PODs. Add a
offset_of_member() macro to util/khash.h because that's what it's used for
in our cases.
* Change the signature of add_debugger_command()/remove_debugger_command() on
GCC > 2 to avoid the depricated conversion from string constants to char *.
* Adding some "suggested" parenthesis. I know that not everyone likes that, but
it pointed out at least one bug that is fixed here as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29113 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d4b5a9b1 06-Nov-2008 Axel Dörfler <axeld@pinc-software.de>

* The kernel daemon now uses a recursive lock instead of a mutex. This fixes
bug #3082.
* Also, it now allows to remove daemons in their hook function.
* Added a "daemons" KDL command that dumps all registered kernel daemons, and
resource resizers.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28550 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 77b93362 21-Aug-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* Refactored the kernel daemon code into a class.
* Added a second kernel daemon service, resource resizer, which is
mainly supposed to be used for resizing allocations asynchrounously.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27122 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f5b3a6a7 05-Jun-2008 Michael Lotz <mmlr@mlotz.ch>

* Initialize all static mutexes in the kernel through a MUTEX_INITIALIZER()
and remove the then unneeded mutex_init() for them.
* Remove the workaround for allowing uninitialized mutexes on kernel startup.
As they are all initialized statically through the MUTEX_INITIALIZER() now
this is not needed anymore.
* An uninitialized mutex will now cause a panic when used to find possibly
remaining cases.
* Remove now unnecessary driver_settings_init_post_sem() function.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25812 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 44431460 22-May-2008 Axel Dörfler <axeld@pinc-software.de>

Daemons are now spawned with "new", and thus they should be sent back using
"delete", not free().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25603 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 02a3b9ef 08-May-2008 Axel Dörfler <axeld@pinc-software.de>

* kernel_daemon is now a C++ file, and uses DoublyLinkedList instead of
the C list mechanism which also makes the code nicer.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25375 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d3166e469cd337a6910f1cb1515b74f73d36466f 29-Apr-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Replaced no longer necessary send_signal_etc() work-arounds for
resume_thread().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36531 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2e7bd0169fb0e8f9af16e139f6cb490ec30a99de 12-Apr-2010 Axel Dörfler <axeld@pinc-software.de>

* The kernel daemon no longer hold its lock when calling the registered hooks.
* This fixes bug #5421.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36209 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8dd44be804716e83ebdf33694fda20cc29eeb085 04-Jan-2010 Axel Dörfler <axeld@pinc-software.de>

* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34891 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e8db7400e97d00a5f32710d77ecfbeda4007e179 03-Jan-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Avoid using DoublyLinkedList internals.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34885 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e045a8c0df58a7ab163fc79ce39437046b244112 03-Jan-2010 Axel Dörfler <axeld@pinc-software.de>

* Solved the problem independently from the list.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34876 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 32883e89807048f5ad66f19c5c27a7097bbd29a6 03-Jan-2010 Axel Dörfler <axeld@pinc-software.de>

* This should hopefully fix the broken kernel - this code relied on clearing
the next/previous pointers. There might be more, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34875 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c33667d400856680a8e0122300861eda77d1847a 01-Feb-2009 Michael Lotz <mmlr@mlotz.ch>

Fixing warnings under GCC4 in preparation to enable -Werror there as well:
* Replaced the use of offsetof() for structs that aren't PODs. Add a
offset_of_member() macro to util/khash.h because that's what it's used for
in our cases.
* Change the signature of add_debugger_command()/remove_debugger_command() on
GCC > 2 to avoid the depricated conversion from string constants to char *.
* Adding some "suggested" parenthesis. I know that not everyone likes that, but
it pointed out at least one bug that is fixed here as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29113 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d4b5a9b14e186df1bd1d4ce2f6da2388a0f56198 06-Nov-2008 Axel Dörfler <axeld@pinc-software.de>

* The kernel daemon now uses a recursive lock instead of a mutex. This fixes
bug #3082.
* Also, it now allows to remove daemons in their hook function.
* Added a "daemons" KDL command that dumps all registered kernel daemons, and
resource resizers.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28550 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 77b93362c2a5a63cfcac4e9f778b657a40b465e2 21-Aug-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* Refactored the kernel daemon code into a class.
* Added a second kernel daemon service, resource resizer, which is
mainly supposed to be used for resizing allocations asynchrounously.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27122 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f5b3a6a7968b849c8cb3d06ffe6d19acccf910a8 05-Jun-2008 Michael Lotz <mmlr@mlotz.ch>

* Initialize all static mutexes in the kernel through a MUTEX_INITIALIZER()
and remove the then unneeded mutex_init() for them.
* Remove the workaround for allowing uninitialized mutexes on kernel startup.
As they are all initialized statically through the MUTEX_INITIALIZER() now
this is not needed anymore.
* An uninitialized mutex will now cause a panic when used to find possibly
remaining cases.
* Remove now unnecessary driver_settings_init_post_sem() function.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25812 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 44431460dd01279e6d40b36f5e670b8f3c4297ef 22-May-2008 Axel Dörfler <axeld@pinc-software.de>

Daemons are now spawned with "new", and thus they should be sent back using
"delete", not free().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25603 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 02a3b9ef494a32bb45b659d19cf82102e1483c6a 08-May-2008 Axel Dörfler <axeld@pinc-software.de>

* kernel_daemon is now a C++ file, and uses DoublyLinkedList instead of
the C list mechanism which also makes the code nicer.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25375 a95241bf-73f2-0310-859d-f6bbb57e9c96