This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Message Queue( inter process communication or data share between task/thread) in sys/bios

Hi,

   I am   new to RTOS concepts , Now I am allocated to TI sys/bios project , I need to know how message queue works in sys/bios  , i.e how the data shared between process or tasks or threads ?

  • Mohamed,

    Message queue(MessageQ) is not directly part of SYS/BIOS but part of the IPC (Interprocess Communication) package that can be used with SYS/BIOS.

    A good way to start with TI-RTOS Kernel (SYS/BIOS) is to go over the following training material to help with the RTOS concepts: http://processors.wiki.ti.com/index.php/TI-RTOS_Workshop

    Then to use Message queue (IPC MessageQ module), you'll have to install IPC which can be found here. Here's the IPC user guide to get you started: http://processors.wiki.ti.com/index.php/IPC_Users_Guide

    The MessageQ module specifically can be learned about here: http://processors.wiki.ti.com/index.php/IPC_Users_Guide/MessageQ_Module

    I'd be pleased to answer any further questions

    Moses

  • Thanks for your reply .

    I have one more question:

    for Each  message queue created , One reader and Multiple writers , how reader knows that what data written by which writer since multiple writer possible?

     

    Many thanks in advance.

  • mohamed ashik said:
    One reader and Multiple writers , how reader knows that what data written by which writer since multiple writer possible?

    That's up to you to manage. A common way though is to use the msgId in the header. Writer X can set the msgId to one value and writer Y can set it to something else.

    Todd

  • Perhaps this is a follow on question:

    Let us assume that we have two tasks defined. One task is responsible for managing all network interfaces on the device (for example) and the other perhaps interfaces with a bunch of sensors and what not. Lets call these TaskA (network tasks), and TaskB (sensor task).

    I wish to detect certain events using TaskB and have TaskA react to these changes and stay blocked otherwise. I have TaskA declare a Queue_Struct and Queue_Handle and have the plumbing needed to unblock on message enqueue. The part I am not able to clearly comprehend, is how I should go about having TaskB enqueue something onto TaskA's Queue?

    Apologies for any mis-understandings that I might have around how the Ti architecture works, and appreciate everyone's time in trying to help with this matter.