include/linux/mcb.h
Source file repositories/reference/linux-study-clean/include/linux/mcb.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/mcb.h- Extension
.h- Size
- 3703 bytes
- Lines
- 133
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: operation-table or driver-model contract
- Status
- pattern implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/mod_devicetable.hlinux/device.hlinux/irqreturn.h
Detected Declarations
struct mcb_driverstruct mcb_devicestruct mcb_busstruct mcb_devicestruct mcb_driverfunction mcb_set_drvdata
Annotated Snippet
struct device_driver driver;
const struct mcb_device_id *id_table;
int (*probe)(struct mcb_device *mdev, const struct mcb_device_id *id);
void (*remove)(struct mcb_device *mdev);
void (*shutdown)(struct mcb_device *mdev);
};
#define to_mcb_driver(__drv) container_of_const(__drv, struct mcb_driver, driver)
static inline void *mcb_get_drvdata(struct mcb_device *dev)
{
return dev_get_drvdata(&dev->dev);
}
static inline void mcb_set_drvdata(struct mcb_device *dev, void *data)
{
dev_set_drvdata(&dev->dev, data);
}
extern int __must_check __mcb_register_driver(struct mcb_driver *drv,
struct module *owner,
const char *mod_name);
#define mcb_register_driver(driver) \
__mcb_register_driver(driver, THIS_MODULE, KBUILD_MODNAME)
extern void mcb_unregister_driver(struct mcb_driver *driver);
#define module_mcb_driver(__mcb_driver) \
module_driver(__mcb_driver, mcb_register_driver, mcb_unregister_driver)
extern void mcb_bus_add_devices(const struct mcb_bus *bus);
extern int mcb_device_register(struct mcb_bus *bus, struct mcb_device *dev);
extern struct mcb_bus *mcb_alloc_bus(struct device *carrier);
extern struct mcb_bus *mcb_bus_get(struct mcb_bus *bus);
extern void mcb_bus_put(struct mcb_bus *bus);
extern struct mcb_device *mcb_alloc_dev(struct mcb_bus *bus);
extern void mcb_free_dev(struct mcb_device *dev);
extern void mcb_release_bus(struct mcb_bus *bus);
extern struct resource *mcb_request_mem(struct mcb_device *dev,
const char *name);
extern void mcb_release_mem(struct resource *mem);
extern int mcb_get_irq(struct mcb_device *dev);
extern struct resource *mcb_get_resource(struct mcb_device *dev,
unsigned int type);
#endif /* _LINUX_MCB_H */
Annotation
- Immediate include surface: `linux/mod_devicetable.h`, `linux/device.h`, `linux/irqreturn.h`.
- Detected declarations: `struct mcb_driver`, `struct mcb_device`, `struct mcb_bus`, `struct mcb_device`, `struct mcb_driver`, `function mcb_set_drvdata`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: pattern implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.