include/drm/drm_util.h
Source file repositories/reference/linux-study-clean/include/drm/drm_util.h
File Facts
- System
- Linux kernel
- Corpus path
include/drm/drm_util.h- Extension
.h- Size
- 2256 bytes
- Lines
- 70
- Domain
- Repository Root And Misc
- Bucket
- include
- Inferred role
- Repository Root And Misc: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
Dependency Surface
linux/interrupt.hlinux/kgdb.hlinux/preempt.hlinux/smp.hlinux/util_macros.h
Detected Declarations
function files
Annotated Snippet
#ifndef _DRM_UTIL_H_
#define _DRM_UTIL_H_
/**
* DOC: drm utils
*
* Macros and inline functions that does not naturally belong in other places
*/
#include <linux/interrupt.h>
#include <linux/kgdb.h>
#include <linux/preempt.h>
#include <linux/smp.h>
#include <linux/util_macros.h>
/*
* Use EXPORT_SYMBOL_FOR_TESTS_ONLY() for functions that shall
* only be visible for drmselftests.
*/
#if defined(CONFIG_DRM_EXPORT_FOR_TESTS)
#define EXPORT_SYMBOL_FOR_TESTS_ONLY(x) EXPORT_SYMBOL(x)
#else
#define EXPORT_SYMBOL_FOR_TESTS_ONLY(x)
#endif
/**
* drm_can_sleep - returns true if currently okay to sleep
*
* This function shall not be used in new code.
* The check for running in atomic context may not work - see linux/preempt.h.
*
* FIXME: All users of drm_can_sleep should be removed (see todo.rst)
*
* Returns:
* False if kgdb is active, we are in atomic context or irqs are disabled.
*/
static inline bool drm_can_sleep(void)
{
if (in_atomic() || in_dbg_master() || irqs_disabled())
return false;
return true;
}
#endif
Annotation
- Immediate include surface: `linux/interrupt.h`, `linux/kgdb.h`, `linux/preempt.h`, `linux/smp.h`, `linux/util_macros.h`.
- Detected declarations: `function files`.
- Atlas domain: Repository Root And Misc / include.
- 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.