mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-28 19:32:36 +08:00
uorb: inline orb_advertise (directly calls orb_advertise_multi)
reduces the stack depth
This commit is contained in:
@@ -139,12 +139,6 @@ int uORB::Manager::orb_exists(const struct orb_metadata *meta, int instance)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
orb_advert_t uORB::Manager::orb_advertise(const struct orb_metadata *meta, const void *data, unsigned int queue_size)
|
|
||||||
{
|
|
||||||
//warnx("orb_advertise meta = %p", meta);
|
|
||||||
return orb_advertise_multi(meta, data, nullptr, ORB_PRIO_DEFAULT, queue_size);
|
|
||||||
}
|
|
||||||
|
|
||||||
orb_advert_t uORB::Manager::orb_advertise_multi(const struct orb_metadata *meta, const void *data, int *instance,
|
orb_advert_t uORB::Manager::orb_advertise_multi(const struct orb_metadata *meta, const void *data, int *instance,
|
||||||
int priority, unsigned int queue_size)
|
int priority, unsigned int queue_size)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -112,7 +112,10 @@ public:
|
|||||||
* ORB_DEFINE with no corresponding ORB_DECLARE)
|
* ORB_DEFINE with no corresponding ORB_DECLARE)
|
||||||
* this function will return nullptr and set errno to ENOENT.
|
* this function will return nullptr and set errno to ENOENT.
|
||||||
*/
|
*/
|
||||||
orb_advert_t orb_advertise(const struct orb_metadata *meta, const void *data, unsigned int queue_size = 1);
|
orb_advert_t orb_advertise(const struct orb_metadata *meta, const void *data, unsigned int queue_size = 1)
|
||||||
|
{
|
||||||
|
return orb_advertise_multi(meta, data, nullptr, ORB_PRIO_DEFAULT, queue_size);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Advertise as the publisher of a topic.
|
* Advertise as the publisher of a topic.
|
||||||
|
|||||||
Reference in New Issue
Block a user