drivers/gpu/drm/i915/i915_tasklet.h
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/i915/i915_tasklet.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/i915/i915_tasklet.h- Extension
.h- Size
- 912 bytes
- Lines
- 44
- Domain
- Driver Families
- Bucket
- drivers/gpu
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/interrupt.h
Detected Declarations
function tasklet_lockfunction tasklet_is_lockedfunction __tasklet_disable_sync_oncefunction __tasklet_is_enabledfunction __tasklet_enablefunction __tasklet_is_scheduled
Annotated Snippet
#ifndef __I915_TASKLET_H__
#define __I915_TASKLET_H__
#include <linux/interrupt.h>
static inline void tasklet_lock(struct tasklet_struct *t)
{
while (!tasklet_trylock(t))
cpu_relax();
}
static inline bool tasklet_is_locked(const struct tasklet_struct *t)
{
return test_bit(TASKLET_STATE_RUN, &t->state);
}
static inline void __tasklet_disable_sync_once(struct tasklet_struct *t)
{
if (!atomic_fetch_inc(&t->count))
tasklet_unlock_spin_wait(t);
}
static inline bool __tasklet_is_enabled(const struct tasklet_struct *t)
{
return !atomic_read(&t->count);
}
static inline bool __tasklet_enable(struct tasklet_struct *t)
{
return atomic_dec_and_test(&t->count);
}
static inline bool __tasklet_is_scheduled(struct tasklet_struct *t)
{
return test_bit(TASKLET_STATE_SCHED, &t->state);
}
#endif /* __I915_TASKLET_H__ */
Annotation
- Immediate include surface: `linux/interrupt.h`.
- Detected declarations: `function tasklet_lock`, `function tasklet_is_locked`, `function __tasklet_disable_sync_once`, `function __tasklet_is_enabled`, `function __tasklet_enable`, `function __tasklet_is_scheduled`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.