include/linux/sched/stat.h
Source file repositories/reference/linux-study-clean/include/linux/sched/stat.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/sched/stat.h- Extension
.h- Size
- 887 bytes
- Lines
- 35
- 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.
Dependency Surface
linux/percpu.hlinux/kconfig.h
Detected Declarations
function sched_info_on
Annotated Snippet
#ifndef _LINUX_SCHED_STAT_H
#define _LINUX_SCHED_STAT_H
#include <linux/percpu.h>
#include <linux/kconfig.h>
/*
* Various counters maintained by the scheduler and fork(),
* exposed via /proc, sys.c or used by drivers via these APIs.
*
* ( Note that all these values are acquired without locking,
* so they can only be relied on in narrow circumstances. )
*/
extern unsigned long total_forks;
extern int nr_threads;
DECLARE_PER_CPU(unsigned long, process_counts);
extern int nr_processes(void);
extern unsigned int nr_running(void);
extern bool single_task_running(void);
extern unsigned int nr_iowait(void);
extern unsigned int nr_iowait_cpu(int cpu);
static inline int sched_info_on(void)
{
return IS_ENABLED(CONFIG_SCHED_INFO);
}
#ifdef CONFIG_SCHEDSTATS
void force_schedstat_enabled(void);
#endif
#endif /* _LINUX_SCHED_STAT_H */
Annotation
- Immediate include surface: `linux/percpu.h`, `linux/kconfig.h`.
- Detected declarations: `function sched_info_on`.
- 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.