Xinhong Hu created a merge request: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1084

Project:Branches: aptacc2421/rtems:rtems#3791_mq_priority_commit_26_2_25 to 
rtems/rtos/rtems:main
Author:   Xinhong Hu



## Summary

posix: Add mq_ispriority to mq_attr for per‑queue discipline selection

This commit extends the POSIX message queue implementation to allow
each queue to choose between FIFO and priority-based thread wakeup
order. A new field `mq_ispriority` is added to the RTEMS-specific
`struct mq_attr`:

- 0 (default) selects FIFO discipline, preserving historical behavior.
- 1 selects priority discipline, where the highest-priority waiting
  thread is woken when a message arrives.

The `mq_open()` function now reads this field and passes the appropriate
discipline (`CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO` or `_PRIORITY`) to the
core message queue. The default attributes structure is updated to set
`.mq_ispriority = 0` to maintain backward compatibility.

This change resolves issue #3791 by providing applications with explicit
control over the queue discipline, while keeping the existing FIFO default
unchanged.

Updates #3791


## Generative AI

<!-- If you have used AI please use the "AI Contribution" template otherwise 
leave this blank see our fulls statement at 
https://www.rtems.org/generative-ai/-->


<!-- Default settings, if it is a dropdown it will set after submission -->

-- 
View it on GitLab: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1084
You're receiving this email because of your account on gitlab.rtems.org.


_______________________________________________
bugs mailing list
[email protected]
http://lists.rtems.org/mailman/listinfo/bugs

Reply via email to