funct(3rtapi)
π funct(3rtapi) π
okay bestie, welcome to funct(3rtapi) β this is an RTAPI manual page, and yes the name is literally funct(3rtapi) which is giving mysterious-but-make-it-functional. it lives in the <pink>rtapi_slab.h</pink> era of the LinuxCNC docs and honestly? iconic. π
β¨ NAME β¨
rtapi_slab.h β RTAPI wrappers for linux kernel functionality. that's the whole vibe. it's a lil bridge file, she's a translator, she's the middle girl between RTAPI and the kernel π«Ά
β¨ SYNTAX β¨
bestie, here's the cast of characters. copy these exactly, they are β¨sacredβ¨:
#include <rtapi_slab.h>
void *rtapi_kmalloc(size_t size, gfp_t g);
void *rtapi_kzalloc(size_t size, gfp_t g);
void *rtapi_krealloc(size_t size, gfp_t g);
void rtapi_kfree(void *);
β¨ DESCRIPTION β¨
okay so here's the tea π
when you're in kernel space, every single rtapi_xxx or RTAPI_XXX identifier gets mapped straight to the underlying kernel functionality β if available. no cap, that's the whole deal.
when you're in userspace, OR in kernels where the underlying functionality isn't provided by a kernel, generally another implementation gets provided instead β and sometimes that implementation has reduced functionality π. for example: the userspace implementation for rtapi_device_register always succeeds. always. she doesn't miss. slay.
β¨ REALTIME CONSIDERATIONS β¨
π¨ bestie this is the important part, do NOT skip it π¨
- Call only from within init/cleanup code, not from realtime tasks. that means no realtime tasks. not even a little one. i'm serious π
- This function is not available from non-realtime code.
so likeβ¦ it's giving very specific-crowd energy. init/cleanup only, periodt. π
β¨ RETURN VALUE β¨
As in Linux. literally. that's it. match the kernel's energy, she said π
β¨ SEE ALSO β¨
- LinuxCNC Documentation π
okay that's the whole page bestie, you ate that πβ¨
this little beauty is brought to you by the fine folks at LinuxCNC Documentation, dated 2014-06-28 β yes she's an elder but she's still serving looks. mwah. ππ¦π
π¦ 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