drivers/net/wwan/iosm/iosm_ipc_task_queue.h
Source file repositories/reference/linux-study-clean/drivers/net/wwan/iosm/iosm_ipc_task_queue.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wwan/iosm/iosm_ipc_task_queue.h- Extension
.h- Size
- 3063 bytes
- Lines
- 98
- Domain
- Driver Families
- Bucket
- drivers/net
- 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
- No C-style include directives detected by the generator.
Detected Declarations
struct ipc_task_queue_argsstruct ipc_task_queuestruct ipc_task
Annotated Snippet
struct ipc_task_queue_args {
struct iosm_imem *ipc_imem;
void *msg;
struct completion *completion;
int (*func)(struct iosm_imem *ipc_imem, int arg, void *msg,
size_t size);
int arg;
size_t size;
int response;
u8 is_copy:1;
};
/**
* struct ipc_task_queue - Struct for Task queue
* @q_lock: Protect the message queue of the ipc ipc_task
* @args: Message queue of the IPC ipc_task
* @q_rpos: First queue element to process.
* @q_wpos: First free element of the input queue.
*/
struct ipc_task_queue {
spinlock_t q_lock; /* for atomic operation on queue */
struct ipc_task_queue_args args[IPC_THREAD_QUEUE_SIZE];
unsigned int q_rpos;
unsigned int q_wpos;
};
/**
* struct ipc_task - Struct for Task
* @dev: Pointer to device structure
* @ipc_tasklet: Tasklet for serialized work offload
* from interrupts and OS callbacks
* @ipc_queue: Task for entry into ipc task queue
*/
struct ipc_task {
struct device *dev;
struct tasklet_struct *ipc_tasklet;
struct ipc_task_queue ipc_queue;
};
/**
* ipc_task_init - Allocate a tasklet
* @ipc_task: Pointer to ipc_task structure
* Returns: 0 on success and failure value on error.
*/
int ipc_task_init(struct ipc_task *ipc_task);
/**
* ipc_task_deinit - Free a tasklet, invalidating its pointer.
* @ipc_task: Pointer to ipc_task structure
*/
void ipc_task_deinit(struct ipc_task *ipc_task);
/**
* ipc_task_queue_send_task - Synchronously/Asynchronously call a function in
* tasklet context.
* @imem: Pointer to iosm_imem struct
* @func: Function to be called in tasklet context
* @arg: Integer argument for func
* @msg: Message pointer argument for func
* @size: Size argument for func
* @wait: if true wait for result
*
* Returns: Result value returned by func or failure value if func could not
* be called.
*/
int ipc_task_queue_send_task(struct iosm_imem *imem,
int (*func)(struct iosm_imem *ipc_imem, int arg,
void *msg, size_t size),
int arg, void *msg, size_t size, bool wait);
#endif
Annotation
- Detected declarations: `struct ipc_task_queue_args`, `struct ipc_task_queue`, `struct ipc_task`.
- Atlas domain: Driver Families / drivers/net.
- 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.