funct(3rtapi)
π funct(3rtapi) π
okay so bestie, pull up a chair, we're doing funct(3rtapi) from the RTAPI manual β yes it's a whole vibe, it's the rtapi_string.h situation, and ngl it's lowkey iconic once you get it.
β¨ NAME β¨
rtapi_string.h β RTAPI wrappers for linux kernel functionality π¦
like, it's the lil' middleman between you and the kernel, fr fr.
π SYNTAX π
here's the tea, copy it exactly, no cap:
#include <rtapi_string.h>
char **rtapi_argv_split(rtapi_gfp_t g, const char *argstr, int *argc);
void rtapi_argv_free(char **argv);
char *rtapi_kstrdup(const char *s, rtapi_gfp_t t);
three whole functions, serving looks. π
πΈ DESCRIPTION πΈ
okay so here's the lore. π
In kernel space, every single rtapi_xxx or RTAPI_XXX identifier gets mapped to the underlying kernel functionality β if it's available. that's the whole bit. if it exists, you get it. π«Ά
In userspace, or in kernels where that underlying functionality just isn't provided by a kernel, generally another implementation is provided instead β and it's possibly with reduced functionality, so read the fine print bestie. π
example that lives rent free in my head: the userspace implementation for rtapi_device_register always succeeds. she's not checking, she's just saying yes. β¨
π REALTIME CONSIDERATIONS π
this is the part where we get serious for one sec, because it's giving danger energy:
- Call only from within
init/cleanupcode. π« - Not from realtime tasks. absolutely not. do not.
- This function is not available from non-realtime code. π
fr fr, do not try to sneak this into a realtime task, the realtime gods will simply not allow it. π
β RETURN VALUE β
As in Linux. π§ that's it, that's the sentence, she's brief and she's correct.
π SEE ALSO π
soβ¦ nothing's listed here. empty. a beautiful blank space. it's giving minimalism, it's giving mystery, iykyk. π
LinuxCNC Documentation πΈ 2014-06-28
and that's the whole page bestie β stay in init/cleanup, keep your rtapi_xxx straight, and go slay. πβ¨ππ¦
π¦ where this page comes from
- debian trixie: linuxcnc-uspace-dev 1:2.9.4-2+deb13u1 Β· GFDL-1.1-or-later
- ubuntu questing: linuxcnc-uspace-dev 1:2.9.4-2ubuntu2
- ubuntu resolute: linuxcnc-uspace-dev 1:2.9.4-2ubuntu4 Β· GFDL-1.1-or-later
- ubuntu stonking: linuxcnc-uspace-dev 1:2.9.4-2ubuntu4 Β· GFDL-1.1-or-later
- Copyright (c) 2014 Jeff Epler
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms