drivers/staging/media/atomisp/pci/base/circbuf/interface/ia_css_circbuf.h
Source file repositories/reference/linux-study-clean/drivers/staging/media/atomisp/pci/base/circbuf/interface/ia_css_circbuf.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/staging/media/atomisp/pci/base/circbuf/interface/ia_css_circbuf.h- Extension
.h- Size
- 8609 bytes
- Lines
- 364
- Domain
- Driver Families
- Bucket
- drivers/staging
- Inferred role
- Driver Families: implementation source
- Status
- source 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
sp.htype_support.hmath_support.hassert_support.hplatform_support.hia_css_circbuf_comm.hia_css_circbuf_desc.h
Detected Declarations
struct ia_css_circbuf_sfunction ia_css_circbuf_elem_set_valfunction ia_css_circbuf_elem_initfunction ia_css_circbuf_elem_cpyfunction ia_css_circbuf_get_pos_at_offsetfunction ia_css_circbuf_get_offsetfunction ia_css_circbuf_get_sizefunction ia_css_circbuf_get_num_elemsfunction ia_css_circbuf_is_emptyfunction ia_css_circbuf_is_fullfunction ia_css_circbuf_writefunction ia_css_circbuf_pushfunction ia_css_circbuf_get_free_elems
Annotated Snippet
struct ia_css_circbuf_s {
ia_css_circbuf_desc_t *desc; /* Pointer to the descriptor of the circbuf */
ia_css_circbuf_elem_t *elems; /* an array of elements */
};
/**
* @brief Create the circular buffer.
*
* @param cb The pointer to the circular buffer.
* @param elems An array of elements.
* @param desc The descriptor set to the size using ia_css_circbuf_desc_init().
*/
void ia_css_circbuf_create(
ia_css_circbuf_t *cb,
ia_css_circbuf_elem_t *elems,
ia_css_circbuf_desc_t *desc);
/**
* @brief Destroy the circular buffer.
*
* @param cb The pointer to the circular buffer.
*/
void ia_css_circbuf_destroy(
ia_css_circbuf_t *cb);
/**
* @brief Pop a value out of the circular buffer.
* Get a value at the head of the circular buffer.
* The user should call "ia_css_circbuf_is_empty()"
* to avoid accessing to an empty buffer.
*
* @param cb The pointer to the circular buffer.
*
* @return the pop-out value.
*/
uint32_t ia_css_circbuf_pop(
ia_css_circbuf_t *cb);
/**
* @brief Extract a value out of the circular buffer.
* Get a value at an arbitrary position in the circular
* buffer. The user should call "ia_css_circbuf_is_empty()"
* to avoid accessing to an empty buffer.
*
* @param cb The pointer to the circular buffer.
* @param offset The offset from "start" to the target position.
*
* @return the extracted value.
*/
uint32_t ia_css_circbuf_extract(
ia_css_circbuf_t *cb,
int offset);
/****************************************************************
*
* Inline functions.
*
****************************************************************/
/**
* @brief Set the "val" field in the element.
*
* @param elem The pointer to the element.
* @param val The value to be set.
*/
static inline void ia_css_circbuf_elem_set_val(
ia_css_circbuf_elem_t *elem,
uint32_t val)
{
OP___assert(elem);
elem->val = val;
}
/**
* @brief Initialize the element.
*
* @param elem The pointer to the element.
*/
static inline void ia_css_circbuf_elem_init(
ia_css_circbuf_elem_t *elem)
{
OP___assert(elem);
ia_css_circbuf_elem_set_val(elem, 0);
}
/**
* @brief Copy an element.
*
* @param src The element as the copy source.
* @param dest The element as the copy destination.
Annotation
- Immediate include surface: `sp.h`, `type_support.h`, `math_support.h`, `assert_support.h`, `platform_support.h`, `ia_css_circbuf_comm.h`, `ia_css_circbuf_desc.h`.
- Detected declarations: `struct ia_css_circbuf_s`, `function ia_css_circbuf_elem_set_val`, `function ia_css_circbuf_elem_init`, `function ia_css_circbuf_elem_cpy`, `function ia_css_circbuf_get_pos_at_offset`, `function ia_css_circbuf_get_offset`, `function ia_css_circbuf_get_size`, `function ia_css_circbuf_get_num_elems`, `function ia_css_circbuf_is_empty`, `function ia_css_circbuf_is_full`.
- Atlas domain: Driver Families / drivers/staging.
- 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.