tools/laptop/freefall/freefall.c
Source file repositories/reference/linux-study-clean/tools/laptop/freefall/freefall.c
File Facts
- System
- Linux kernel
- Corpus path
tools/laptop/freefall/freefall.c- Extension
.c- Size
- 3176 bytes
- Lines
- 174
- 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.hunistd.hfcntl.hsys/stat.hsys/types.hstring.hstdint.herrno.hsignal.hsys/mman.hsched.hsyslog.h
Detected Declarations
function set_unload_heads_pathfunction valid_diskfunction write_intfunction set_ledfunction protectfunction on_acfunction lid_openfunction ignore_mefunction main
Annotated Snippet
if ((ret == -1) && (errno == EINTR)) {
/* Alarm expired, time to unpark the heads */
continue;
}
if (ret != sizeof(count)) {
perror("read");
break;
}
protect(21);
set_led(1);
if (1 || on_ac() || lid_open())
alarm(2);
else
alarm(20);
}
closelog();
close(fd);
return EXIT_SUCCESS;
}
Annotation
- Immediate include surface: `stdio.h`, `stdlib.h`, `unistd.h`, `fcntl.h`, `sys/stat.h`, `sys/types.h`, `string.h`, `stdint.h`.
- Detected declarations: `function set_unload_heads_path`, `function valid_disk`, `function write_int`, `function set_led`, `function protect`, `function on_ac`, `function lid_open`, `function ignore_me`, `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.