haiku/headers/private/kernel/kdevice_manager.h
Augustin Cavalier 0450e7b802 USB: Acquire the device manager lock before Explore.
We must do this to prevent lock order inversion: when busses are
initialized, they are started by the (locked) device manager, and
then acquire the explore lock. We must do the same in Explore itself,
for when called by the explore thread, we would otherwise first acquire
the explore lock, then (when publishing new nodes) acquire the device lock.

Should fix #18421 and #18393.
2023-05-31 16:49:41 -04:00

32 lines
686 B
C

/*
* Copyright 2004-2008, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _KERNEL_DEVICE_MANAGER_H
#define _KERNEL_DEVICE_MANAGER_H
#include <device_manager.h>
#include <lock.h>
struct kernel_args;
#ifdef __cplusplus
extern "C" {
#endif
void legacy_driver_add_preloaded(struct kernel_args *args);
status_t device_manager_probe(const char *path, uint32 updateCycle);
status_t device_manager_init(struct kernel_args *args);
status_t device_manager_init_post_modules(struct kernel_args *args);
recursive_lock* device_manager_get_lock();
#ifdef __cplusplus
}
#endif
#endif /* _KERNEL_DEVICE_MANAGER_H */