samples/bpf/task_fd_query_kern.c
Source file repositories/reference/linux-study-clean/samples/bpf/task_fd_query_kern.c
File Facts
- System
- Linux kernel
- Corpus path
samples/bpf/task_fd_query_kern.c- Extension
.c- Size
- 412 bytes
- Lines
- 20
- Domain
- Support Tooling And Documentation
- Bucket
- samples
- Inferred role
- Support Tooling And Documentation: implementation source
- Status
- source implementation candidate
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/version.hlinux/ptrace.huapi/linux/bpf.hbpf/bpf_helpers.h
Detected Declarations
function bpf_prog1function bpf_prog2
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0
#include <linux/version.h>
#include <linux/ptrace.h>
#include <uapi/linux/bpf.h>
#include <bpf/bpf_helpers.h>
SEC("kprobe/blk_mq_start_request")
int bpf_prog1(struct pt_regs *ctx)
{
return 0;
}
SEC("kretprobe/__blk_account_io_done")
int bpf_prog2(struct pt_regs *ctx)
{
return 0;
}
char _license[] SEC("license") = "GPL";
u32 _version SEC("version") = LINUX_VERSION_CODE;
Annotation
- Immediate include surface: `linux/version.h`, `linux/ptrace.h`, `uapi/linux/bpf.h`, `bpf/bpf_helpers.h`.
- Detected declarations: `function bpf_prog1`, `function bpf_prog2`.
- Atlas domain: Support Tooling And Documentation / samples.
- 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.