Checked one of Marcus' comments in int.c, and changed the list initialization
to use the newly provided function for this. module.c now also uses the initque() function, some minor cleanups. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1973 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -100,11 +100,9 @@ install_interrupt_handler(long vector, interrupt_handler handler, void *data)
|
|||||||
state = disable_interrupts();
|
state = disable_interrupts();
|
||||||
acquire_spinlock(&io_vectors[vector].vector_lock);
|
acquire_spinlock(&io_vectors[vector].vector_lock);
|
||||||
|
|
||||||
/* Make sure our list is init'd or bad things will happen */ //XXX this should not be needed
|
/* The list must be inited before the first item is inserted */
|
||||||
if (io_vectors[vector].handler_list.next == NULL) {
|
if (io_vectors[vector].handler_list.next == NULL)
|
||||||
io_vectors[vector].handler_list.next = &io_vectors[vector].handler_list;
|
initque(&io_vectors[vector].handler_list);
|
||||||
io_vectors[vector].handler_list.prev = &io_vectors[vector].handler_list;
|
|
||||||
}
|
|
||||||
|
|
||||||
insque(io, &io_vectors[vector].handler_list);
|
insque(io, &io_vectors[vector].handler_list);
|
||||||
|
|
||||||
|
|||||||
@@ -912,9 +912,11 @@ close_module_list(void *cookie)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* module_init
|
/* module_init
|
||||||
* setup module structures and data for use
|
* setup module structures and data for use
|
||||||
*/
|
*/
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
module_init(kernel_args *ka, module_info **sys_module_headers)
|
module_init(kernel_args *ka, module_info **sys_module_headers)
|
||||||
{
|
{
|
||||||
@@ -927,8 +929,8 @@ module_init(kernel_args *ka, module_info **sys_module_headers)
|
|||||||
if (modules_list == NULL || module_files == NULL)
|
if (modules_list == NULL || module_files == NULL)
|
||||||
return ENOMEM;
|
return ENOMEM;
|
||||||
|
|
||||||
loaded_modules.next = loaded_modules.prev = &loaded_modules;
|
initque(&loaded_modules);
|
||||||
known_modules.next = known_modules.prev = &known_modules;
|
initque(&known_modules);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
if (sys_module_headers) {
|
if (sys_module_headers) {
|
||||||
@@ -937,7 +939,7 @@ module_init(kernel_args *ka, module_info **sys_module_headers)
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
return B_NO_ERROR;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user