funct(3rtapi)

πŸ“¦
version 2.9.4 Β· 2 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– 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/cleanup code. 🚫
  • 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