iv_main(3)
π iv_main(3) β the ivykis programmer's manual, but make it cute π
okay bestie, sit down, hydrate, and let me tell you about iv_main β straight out of the ivykis programmer's manual. this is the function that literally starts the party for your thread. no cap. π
β¨ NAME β¨
iv_main β enter the ivykis main loop. that's it. that's the whole job. she walks in, she runs the loop. main character energy fr fr. π
πΈ SYNOPSIS πΈ
#include <iv.h>
void iv_main(void);
no args, no return value, no drama. void in, void out. she's mysterious like that. π
π¦ DESCRIPTION π¦
okay so, iv_main enters the current thread's ivykis main loop. current thread. that's important, bestie β i'll get to why in a sec. π«Ά
and what even is the ivykis main loop, you ask? it's this whole situation:
- it checks the status of all the registered file descriptors, timers and tasks, and then
- it either calls the callback functions that correspond to the objects that are active, or
- it just blocks until an event shows up. π
like, it's either doing the thing or waiting very patiently for the thing. both are valid. both are iconic. β¨
and here's the part that makes her different from every other main loop out there: every thread that wants to use ivykis has to call iv_main individually. individually!! each thread!! her own call!! no sharing, no borrowing, no "oh my friend already called it." π
β οΈ and bestie, listen β you can only do this after you've already callediv_init(3)earlier.iv_initfirst,iv_mainsecond. that's the order. do not skip step one. do not flip them. that's it, that's the rule. π
π SEE ALSO π
ivykis(3)β the whole vibe, the mothership πiv_examples(3)β examples!! if you learn by reading code like me πiv_quit(3)β the one you call when you want the loop to, uh, stop π§
and that's the page, bestie!! it's from the ivykis crew and it's dated 2010-08-15 β old enough to be vintage, still serving π go forth, call iv_init first, then iv_main, and slay. periodt. πβ¨π
π¦ where this page comes from
- alpine 3.22: ivykis-doc 0.43.2-r0 Β· LGPL-2.1-or-later
- alpine 3.23: ivykis-doc 0.43.2-r0 Β· LGPL-2.1-or-later
- alpine 3.24: ivykis-doc 0.43.2-r0 Β· LGPL-2.1-or-later
- debian bookworm: libivykis-dev 0.42.4-1
- debian trixie: libivykis-dev 0.43.2-1+b1
- epel 10: ivykis-devel 0.43.2-2.el10_0 Β· LicenseRef-Callaway-LGPLv2+
- epel 9: ivykis-devel 0.42.4-7.el9 Β· LGPLv2+
- fedora 43: ivykis-devel 0.43.2-4.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: ivykis-devel 0.43.2-4.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 44: ivykis-devel 0.43.2-5.fc44 Β· LicenseRef-Callaway-LGPLv2+
- fedora 44: ivykis-devel 0.43.2-5.fc44 Β· LicenseRef-Callaway-LGPLv2+
- nixpkgs unstable: libivykis 0.43.2
- opensuse-leap 16.0: ivykis-devel 0.43-bp160.1.12 Β· LGPL-2.1-only
- opensuse-leap 16.0: ivykis-devel 0.43-bp160.1.12 Β· LGPL-2.1-only
- opensuse-leap 16.0: ivykis-devel 0.43-bp160.1.12 Β· LGPL-2.1-only
- opensuse-leap 16.0: ivykis-devel 0.43-bp160.1.12 Β· LGPL-2.1-only
- ubuntu jammy: libivykis-dev 0.42.4-1
- ubuntu noble: libivykis-dev 0.43-1build1
- ubuntu questing: libivykis-dev 0.43.2-1
- ubuntu resolute: libivykis-dev 0.43.2-1build1
- ubuntu stonking: libivykis-dev 0.43.2-1build1
- Copyright (C) 2003, 2010 Lennert Buytenhek
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms