atcwdt_get_clock_period(9)

๐Ÿ“ฆ version 7.3.1, in nixpkgs unstable

๐Ÿ’… atcwdt_get_clock_period(9) ๐Ÿ’…

ok so bestie, welcome to the Kernel API Manual โœจ โ€” today's main character is atcwdt_get_clock_period(9), and honestly? she's doing the math so you don't have to ๐Ÿงฎ๐Ÿ’–


๐ŸŒธ NAME ๐ŸŒธ

atcwdt_get_clock_period โ€” calculates the closest clock period based on a given tick count ๐ŸŽฏ like, that's literally her whole job


โœจ SYNOPSIS โœจ

long long atcwdt_get_clock_period (long long tick , enum timer_type
timer_type , unsigned char *index );

three params in, one long long out โ€” no cap, she keeps it simple ๐Ÿซถ


๐ŸŽ€ ARGUMENTS ๐ŸŽ€

  • tick โ€” the target tick count you're trying to match ๐ŸŒŸ this is the vibe you're aiming for
  • timer_type โ€” the type of timer, and it can be TMR_RST, TMR_INT_16, or TMR_INT_32 ๐Ÿ‘‘ (yes, exactly those three, don't get creative)
  • index โ€” a pointer where the index of the selected parameter gets stored ๐Ÿ“ so she'll write back into it, keep that in mind

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

okay so here's the tea โ˜•: this function calculates the closest clock period to the given tick count by iterating through the timer parameters and picking the one that minimizes the difference between your target tick count and the calculated clock period. the way that she just... goes through them all and finds the bestie that fits closest, no drama ๐Ÿ’…

then she figures out the index of that closest parameter (remember that pointer? yeah, that's where it goes ๐ŸŽฏ) and returns the difference between the target tick count and the selected clock period. so the return value is basically a report card of how close she got ๐Ÿ“Šโœจ


๐Ÿ”ฅ RETURN ๐Ÿ”ฅ

the difference between the target tick count and the selected clock period ๐Ÿ’€ that's it, that's the whole return. a number that tells you how far off the chosen period is from what you asked for โœจ


๐ŸŒˆ SEE ALSO ๐ŸŒˆ

like, go read those too, they all hang out together iykyk ๐Ÿซถ๐Ÿฆ‹


okay bestie that's the whole page, ily, go forth and slay your watchdog timers ๐Ÿ’–๐ŸŒธ๐Ÿงš

signing off from the ./drivers/watchdog directory โ€” page dated October 2026, straight out of the Kernel API Manual, mwah ๐Ÿ˜˜๐Ÿ’…

๐Ÿ“ฆ where this page comes from