Chandan U commented: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1164#note_148264


In the recent commit, I followed the suggested design and changed POSIX Message 
queue to support two compile-time layouts,

- CORE_message_queue_Control (normal)
- CORE_priority_message_queue_Control (optimized)

I used a typedef alias and one common struct field, 
`POSIX_message_queue_Core_control Message_queue`

This avoids duplicate struct members and allows compile-time selection. In the 
optimized layout, the base CORE queue is in `Message_queue.Base`

**Next step:** update POSIX source files that still directly use 
`the_mq->Message_queue` to use `_POSIX_Message_queue_Get_core_queue( the_mq )` 
so both layouts work correctly.

I scanned with: `rg -n "the_mq->Message_queue" cpukit/posix/src 
cpukit/include/rtems/posix` and identified the POSIX source locations to update.

Also, special cases are handled separately:

- THREAD_QUEUE_OBJECT_ASSERT()
- RTEMS_CONTAINER_OF( )

which reference the `Message_queue` member path.

Am I in the right direction?

-- 
View it on GitLab: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1164#note_148264
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