Forum Discussion
Altera_Forum
Honored Contributor
20 years agoMessage boxes in eCos
Hi all, cyg_mbox_peek (), is always returning the count 1 less than the actual number of messages in the message box. When the message box is empty, then count is returned as 0. Why this is so?...
Altera_Forum
Honored Contributor
20 years ago --- Quote Start --- --- Quote Start --- Hi, Thanks Sepp for your suggestion. The program is giving correct results now, using cyg_mbox_tryget () instead of cyg_mbox_get (). But still I have one doubt. The reason that you had specified for cyg_mbox_get () is okay, but then using that concept cyg_mbox_peek () would always had returned the count as 0? With regards, Sanjay