funct(3rtapi)

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

πŸ’– funct(3rtapi) πŸ’–

okay bestie, so this is a page from the RTAPI manual (section 3rtapi), and it's all about rtapi_list.h β€” the RTAPI wrappers for linux kernel functionality. yes, that kind of list. linked-list kinda list. sit down, hydrate, let's go 🫢


✨ NAME ✨

rtapi_list.h β€” RTAPI wrappers for linux kernel functionality


✨ SYNTAX ✨

here's the whole shape of it, no cap:

#include <rtapi_list.h>

struct rtapi_list_head;

void rtapi_list_add(struct rtapi_list_head *new_, struct rtapi_list_head
       *head);

void rtapi_list_add_tail(struct rtapi_list_head *new_, struct
       rtapi_list_head *head);

void rtapi_list_del(struct rtapi_list_head *entry);

void RTAPI_INIT_LIST_HEAD(struct rtapi_list_head *entry);

rtapi_list_for_each(pos, head) { ... }

rtapi_list_entry(ptr, type, member)

so we got an opaque-ish struct rtapi_list_head, two adders (front and tail, obviously), a deleter, an INIT macro, a for_each loop, and rtapi_list_entry for getting back to the thing you actually wrapped. iconic lineup honestly 🌸


✨ DESCRIPTION ✨

so here's the tea β˜• β€” in kernel space, every single rtapi_xxx or RTAPI_XXX identifier gets mapped to the underlying kernel functionality, if available. if it's not available? then it's just… not. that's the deal.

in userspace, or in kernels where the kernel doesn't provide that underlying functionality, generally another implementation is provided instead β€” possibly with reduced functionality. like, it might not do everything the real one does, and that's a whole thing. for example: the userspace implementation for rtapi_device_register always succeeds. always. every time. no failures, bestie πŸ’…


✨ REALTIME CONSIDERATIONS ✨

⏰ call these from init/cleanup code and from realtime tasks. that's the vibe.

and now the scary part πŸ™ˆ β€” these functions will cause illegal instruction exceptions in non-realtime components, and in uspace rtapi_app when it is not setuid root. not a drill. do not pass go. do not collect $200. respect the realtime boundary fr fr πŸ’€


✨ RETURN VALUE ✨

as in Linux. that's it, that's the whole answer πŸŽ€


✨ SEE ALSO ✨

literally nothing listed here bestie, the section is empty β€” it's giving minimalism, it's giving "go read the Linux docs" 😭


and that's the page!! this came out of the LinuxCNC Documentation, dated 2014-06-28, and it lives at funct(3rtapi). slay, go forth, link those lists πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from