* 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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user