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.

MessageQ_get() in Interrupt Mode



Hi All,

          what i understand from MessageQ_Get() is that it is POLLING based mechanism to retrieve messages [underlying mechanism is signal() at MessageQ_put() and wait() at MessageQ_get()]. My interest lies in making it Interrupt based, meaning whenever there is message, it should awake the other core.

1.[one method is to use Notify module and Notify the reader core by the writer core, the moment you do MessageQ_put() at writer core].

apart from above, is there any way, INTERRUPT based mechanism can be invoked within MessageQ Module APIs. please let me know.

Thanks

RC Reddy

  • RCReddy,

    I think you misunderstand the MessageQ_get().  It is not pulling be default (you can make it pull, if that's what you want).  The default behavior is interrupt based.  MessageQ_get() pends on a semaphore if no Message is available.  When someone does a Message_put(), it will put the message on the queue, send an interrupt if necessary and a semaphore post will occur.  I think this is what you want correct?

    Judah

  • Further to above question,

    1. is there anyway i can link IPC moduels to sys/bios Thread Synchronization modules. say CORE 0 sends message to CORE 1, Instead of MessageQ_Get(), i want to have Mailbox_pend() wake up [remember, this is CORE TO CORE Communication and i want to link MessageQ_get() to SYS/BIOS mailbox.].

    my idea is to have a Mailbox pend on some generic COMMON Header [objects/structure elements common between mailbox header and MessageQ_Header() ]. Is there any provision for MessageQ module and sys/bios MailBox concepts to gel together.

    Thanks

    RC Reddy

  • Hi Judah,

                 got it, now i understood,

    Thanks

    RC Reddy

  • not only Mailbox, any Thread Synchronization Module gelling with MessageQ Module ? any example code or any pointers ..please let me know.

    RC Reddy

  • RC Reddy,

    My only pointer is to read the IPC User's guide.pdf.  There's a chapter called "Thread Synchronization".  This should give you some hints.

    You should be able to use like Mailbox_pend()/post() as the synchronization calls for Messageq_put()/get().

    Judah