tools/testing/selftests/timers/leapcrash.c
Source file repositories/reference/linux-study-clean/tools/testing/selftests/timers/leapcrash.c
File Facts
- System
- Linux kernel
- Corpus path
tools/testing/selftests/timers/leapcrash.c- Extension
.c- Size
- 2274 bytes
- Lines
- 109
- Domain
- Support Tooling And Documentation
- Bucket
- tools
- 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
stdio.hstdlib.htime.hsys/time.hsys/timex.hstring.hsignal.hkselftest.h
Detected Declarations
function clear_time_statefunction handlerfunction main
Annotated Snippet
if (settimeofday(&tv, NULL)) {
printf("Error: You're likely not running with proper (ie: root) permissions\n");
ksft_exit_fail();
}
tx.modes = 0;
adjtimex(&tx);
/* hammer on adjtime w/ STA_INS */
while (tx.time.tv_sec < next_leap + 1) {
/* Set the leap second insert flag */
tx.modes = ADJ_STATUS;
tx.status = STA_INS;
adjtimex(&tx);
}
clear_time_state();
printf(".");
fflush(stdout);
}
printf("[OK]\n");
ksft_exit_pass();
}
Annotation
- Immediate include surface: `stdio.h`, `stdlib.h`, `time.h`, `sys/time.h`, `sys/timex.h`, `string.h`, `signal.h`, `kselftest.h`.
- Detected declarations: `function clear_time_state`, `function handler`, `function main`.
- Atlas domain: Support Tooling And Documentation / tools.
- 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.