drivers/edac/wq.c
Source file repositories/reference/linux-study-clean/drivers/edac/wq.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/edac/wq.c- Extension
.c- Size
- 801 bytes
- Lines
- 43
- Domain
- Driver Families
- Bucket
- drivers/edac
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
edac_module.h
Detected Declarations
function edac_queue_workfunction edac_mod_workfunction edac_stop_workfunction edac_workqueue_setupfunction edac_workqueue_teardownexport edac_queue_workexport edac_mod_workexport edac_stop_work
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-only
#include "edac_module.h"
static struct workqueue_struct *wq;
bool edac_queue_work(struct delayed_work *work, unsigned long delay)
{
return queue_delayed_work(wq, work, delay);
}
EXPORT_SYMBOL_GPL(edac_queue_work);
bool edac_mod_work(struct delayed_work *work, unsigned long delay)
{
return mod_delayed_work(wq, work, delay);
}
EXPORT_SYMBOL_GPL(edac_mod_work);
bool edac_stop_work(struct delayed_work *work)
{
bool ret;
ret = cancel_delayed_work_sync(work);
flush_workqueue(wq);
return ret;
}
EXPORT_SYMBOL_GPL(edac_stop_work);
int edac_workqueue_setup(void)
{
wq = alloc_ordered_workqueue("edac-poller", WQ_MEM_RECLAIM);
if (!wq)
return -ENODEV;
else
return 0;
}
void edac_workqueue_teardown(void)
{
destroy_workqueue(wq);
wq = NULL;
}
Annotation
- Immediate include surface: `edac_module.h`.
- Detected declarations: `function edac_queue_work`, `function edac_mod_work`, `function edac_stop_work`, `function edac_workqueue_setup`, `function edac_workqueue_teardown`, `export edac_queue_work`, `export edac_mod_work`, `export edac_stop_work`.
- Atlas domain: Driver Families / drivers/edac.
- Implementation status: integration 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.