Share queue with multiple QueueSet

parmi wrote on Friday, April 19, 2019:

is it possible to share a queue with multiple queue set?



int main()
    QueueHandle_t queue = xQueueCreate(10, sizeof(void*));

    QueueHandle_t shared_queue = xQueueCreate(10, sizeof(void*));

    SemaphoreHandle_t semaphore = xSemaphoreCreateBinary();

    QueueSetHandle_t semaphore_and_shared_queue = xQueueCreateSet(10 + 1);

    QueueSetHandle_t queue_and_shared_queue = xQueueCreateSet(10 + 10);

    xQueueAddToSet((QueueSetMemberHandle_t)semaphore, semaphore_and_shared_queue);

    xQueueAddToSet((QueueSetMemberHandle_t)shared_queue, semaphore_and_shared_queue);

    xQueueAddToSet((QueueSetMemberHandle_t)queue, queue_and_shared_queue);

    xQueueAddToSet((QueueSetMemberHandle_t)shared_queue, queue_and_shared_queue);

is a valid code according to the Free RTOS paradigms?


rtel wrote on Friday, April 19, 2019:

Unfortunately not as each queue only has one pxQueueSetContainer member
in its structure.

parmi wrote on Tuesday, August 20, 2019:

Ok thanks =)