rtapi_task_wait(3rtapi)

πŸ’€ rtapi_task_wait β€” the "bestie, take a nap till next period" function (from the rtapi manual, section 3) ✨

okay so picture this: you're a periodic realtime task, you've done your little chores for this cycle, and now you just... vibe until the next one. that's the whole gig. πŸŽ€


✨ SYNTAX ✨

void rtapi_task_wait()

no args. no return. just vibes. πŸ’…


🌸 DESCRIPTION 🌸

rtapi_task_wait suspends execution of the current task until the next period. that's it, that's the function. πŸ¦‹

the catch?? the task MUST be periodic. like, that's not optional, that's the whole personality. if it's not periodic, the result is undefined β€” and bestie we do NOT do undefined, that's giving chaos demon energy πŸ˜­πŸ’€


πŸ‘‘ REALTIME CONSIDERATIONS πŸ‘‘

call this only from within a periodic realtime task. fr fr. no exceptions, no sneaky little calls from somewhere else, iykyk. πŸ”₯

🫢 RETURN VALUE 🫢

None. nothing. zero. it returns nothing because it doesn't need to, main character behaviour honestly. ✨


πŸ’– SEE ALSO πŸ’–

go read those next, bestie, they're the sibling functions and they ate πŸ“


okay that's the whole page!! this was from the LinuxCNC Documentation, dated 2006-10-12, and the source is rtapi_task_wait(3rtapi) β€” yes the date is older than most of us and she's still serving πŸ’…πŸŒŸ mwah, go write some realtime code responsibly, love u, bye!! πŸ§šπŸ’œ