* 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
This commit is contained in:
Michael Lotz
2008-06-05 23:19:27 +00:00
parent 2b31f85c9e
commit f5b3a6a796
16 changed files with 32 additions and 66 deletions
+2 -5
View File
@@ -33,7 +33,7 @@ struct daemon : DoublyLinkedListLinkImpl<struct daemon> {
typedef DoublyLinkedList<struct daemon> DaemonList;
static mutex sDaemonMutex;
static mutex sDaemonMutex = MUTEX_INITIALIZER("kernel daemon");
static DaemonList sDaemons;
@@ -130,12 +130,9 @@ register_kernel_daemon(daemon_hook function, void* arg, int frequency)
extern "C" status_t
kernel_daemon_init(void)
{
thread_id thread;
mutex_init(&sDaemonMutex, "kernel daemon");
new(&sDaemons) DaemonList;
thread = spawn_kernel_thread(&kernel_daemon, "kernel daemon",
thread_id thread = spawn_kernel_thread(&kernel_daemon, "kernel daemon",
B_LOW_PRIORITY, NULL);
send_signal_etc(thread, SIGCONT, B_DO_NOT_RESCHEDULE);