funct(3rtapi)
πΈ funct(3rtapi) πΈ
okay bestie, welcome to the 3rtapi girlies club π
this is funct from section 3 of the RTAPI manuals, and it's all about rtapi_pci.h β RTAPI wrappers for linux kernel functionality. yes it's kernel-adjacent, yes it's a little feral, no we are not scared. π¦
β¨ NAME β¨
rtapi_pci.h β RTAPI wrappers for linux kernel functionality π«Ά
β¨ SYNTAX β¨
bestie here's the whole vibe, verbatim, no edits, she's serving exactly what she serves π
#include <rtapi_pci.h>
struct rtapi_pci_device_id { ... };
struct rtapi_pci_resource { ... };
struct rtapi_pci_dev { ... };
struct rtapi_pci_driver { ... };
const char *rtapi_pci_name(const struct rtapi_pci_dev *pdev);
int rtapi_pci_enable_device(struct rtapi_pci_dev *dev);
void rtapi__iomem *rtapi_pci_ioremap_bar(struct rtapi_pci_dev *pdev, int
bar);
int rtapi_pci_register_driver(struct rtapi_pci_driver *driver);
void rtapi_pci_unregister_driver(struct rtapi_pci_driver *driver);
int rtapi_pci_enable_device(struct rtapi_pci_dev *dev);
int rtapi_pci_disable_device(struct rtapi_pci_dev *dev);
#define rtapi_pci_resource_start(dev, bar) ...
#define rtapi_pci_resource_end(dev, bar) ...
#define rtapi_pci_resource_flags(dev, bar) ...
#define rtapi_pci_resource_len(dev,bar) ....
void rtapi_pci_set_drvdata(struct rtapi_pci_dev *pdev, void *data)
void rtapi_pci_set_drvdata(struct rtapi_pci_dev *pdev, void *data)
void rtapi_iounmap(volatile void *addr);
struct rtapi_pci;
not me spottingrtapi_pci_enable_devicetwice andrtapi_pci_set_drvdatatwice in there π bestie that's not a typo on my end, that's literally how she's written. we do not "fix" the original, we respect her exactly as she is. periodt.
β¨ DESCRIPTION β¨
okay so here's the whole concept, and it's actually iconic π
- In kernel space, every
rtapi_xxxorRTAPI_XXXidentifier gets mapped to the underlying kernel functionality β if available. iykyk. π - In userspace, or in kernels where the underlying functionality just isn't provided by a kernel, generally another implementation is provided instead β possibly with reduced functionality. like, she's still showing up, she's just maybe wearing a slightly different outfit. lowkey valid.
- for example: the userspace implementation for
rtapi_pci_registeralways succeeds. always. no notes. she ate and left no crumbs β¨
- for example: the userspace implementation for
β¨ REALTIME CONSIDERATIONS β¨
typically, these functions may be called from realtime init/cleanup code. so like, if you're in your realtime era, you're good to go bestie π«Ά
β¨ RETURN VALUE β¨
as in Linux. π (that's it, that's the whole sentence, and honestly? she's right.)
β¨ SEE ALSO β¨
LinuxCNC Documentation πβ¨
mwah π that's the whole page, bestie. this one is from the LinuxCNC Documentation, dated 2014-06-28, filed under funct(3rtapi) β go forth, wrap those kernel functions, and slay responsibly. no cap. ππ¦π
π¦ where this page comes from
- debian bookworm: linuxcnc-uspace-dev 2.9.0~pre1+git20230208.f1270d6ed7-1+deb12u2 Β· GFDL-1.1-or-later
- 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