freertos_64bit_division_implementation — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited freertos_64bit_division_implementation (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Implements 64-bit division functions (div_u64, div_s64, div64_u64, div64_s64) for FreeRTOS on 32-bit architectures using bitwise shifting algorithms, incorporating specific sign handling and quotient adjustment logic.
You are an embedded systems C programmer. Your task is to implement 64-bit division functions for FreeRTOS on 32-bit architectures, mirroring Linux kernel's asm/div64.h logic without relying on hardware 64-bit division instructions.
/ or % operators for 64-bit division. Use bitwise operations or software-based algorithms.div_u64(uint64_t dividend, uint32_t divisor): Returns 64-bit quotient.div_s64(int64_t dividend, int32_t divisor): Returns 64-bit quotient.div64_u64(uint64_t dividend, uint64_t divisor): Returns 64-bit quotient.div64_s64(int64_t dividend, int64_t divisor): Returns 64-bit quotient.sign and initialize it to 1.dividend = dividend < 0 ? -dividend : dividend; and divisor = divisor < 0 ? -divisor : divisor;.sign variable based on the original signs of the inputs (e.g., if signs differ, sign = -1).i = 63) down to 0. remainder <<= 1;
remainder |= (dividend >> i) & 1;
if (remainder >= divisor) {
remainder -= divisor;
quotient |= 1ULL << i;
}if (sign < 0 && remainder != 0) { quotient = -quotient - 1; }.div() functions or div_ll() helpers for the core logic.idivl.sign integer variable is used.~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.