include/linux/dmapool.h
Source file repositories/reference/linux-study-clean/include/linux/dmapool.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/dmapool.h- Extension
.h- Size
- 2385 bytes
- Lines
- 79
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source 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 or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/nodemask_types.hlinux/scatterlist.hasm/io.h
Detected Declarations
struct devicefunction dma_pool_destroyfunction dma_pool_freefunction dmam_pool_destroyfunction dma_pool_alloc
Annotated Snippet
static inline void dma_pool_destroy(struct dma_pool *pool) { }
static inline void *dma_pool_alloc(struct dma_pool *pool, gfp_t mem_flags,
dma_addr_t *handle) { return NULL; }
static inline void dma_pool_free(struct dma_pool *pool, void *vaddr,
dma_addr_t addr) { }
static inline struct dma_pool *dmam_pool_create(const char *name,
struct device *dev, size_t size, size_t align, size_t allocation)
{ return NULL; }
static inline void dmam_pool_destroy(struct dma_pool *pool) { }
#endif /* !CONFIG_HAS_DMA */
static inline struct dma_pool *dma_pool_create(const char *name,
struct device *dev, size_t size, size_t align, size_t boundary)
{
return dma_pool_create_node(name, dev, size, align, boundary,
NUMA_NO_NODE);
}
/**
* dma_pool_zalloc - Get a zero-initialized block of DMA coherent memory.
* @pool: dma pool that will produce the block
* @mem_flags: GFP_* bitmask
* @handle: pointer to dma address of block
*
* Same as dma_pool_alloc(), but the returned memory is zeroed.
*/
static inline void *dma_pool_zalloc(struct dma_pool *pool, gfp_t mem_flags,
dma_addr_t *handle)
{
return dma_pool_alloc(pool, mem_flags | __GFP_ZERO, handle);
}
#endif
Annotation
- Immediate include surface: `linux/nodemask_types.h`, `linux/scatterlist.h`, `asm/io.h`.
- Detected declarations: `struct device`, `function dma_pool_destroy`, `function dma_pool_free`, `function dmam_pool_destroy`, `function dma_pool_alloc`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: source 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.