Hello,
I'm using an event instance with implicit posted events from a mailbox AND a semaphore.
Is it possible to configure both events on the same implicit posted event? But anyway my bug is also there using only semaphore with event, no mailbox.
The problem is that Event_pend unblocked 4 times for a single semaphore post. Just one task thread is waiting for a single event object.
After a semaphore post, the pattern is this (check the code bellow):
1 time POINT A
1 time POINT B
1 time POINT A
1 time POINT B
This is how I configure the OR and AND masks:
*****************
unsigned long events = Event_pend(myEvent, IMPOSSIBLE_EVENT_ID, // andMask
MAILBOX_EVENT_ID + SEMAPHORE_EVENT_ID, // orMask
BIOS_WAIT_FOREVER); //
// Since it waits forever, shouldn't go here.
if ( events == NONE_EVENT_ID )
{
mask |= MSG_ERROR; //*************** POINT A
}
if ( events & MAILBOX_EVENT_ID )
{
if ( Mailbox_pend( mailboxHandle, message, BIOS_NO_WAIT) == FALSE )
{
mask |= MSG_ERROR; //Shall have a message at this point.
}
mask |= MSG_RECEIVED;
}
if ( events & SEMAPHORE_EVENT_ID )
{
mask |= EXEC_REQUEST; //****************** POINT B
}
return mask;
}
static const unsigned long NONE_EVENT_ID = Event_Id_NONE;
static const unsigned long MAILBOX_EVENT_ID = Event_Id_00;
static const unsigned long SEMAPHORE_EVENT_ID = Event_Id_01;
static const unsigned long IMPOSSIBLE_EVENT_ID = Event_Id_06;
**********************
I've tried the AND mask with Event_Id_NONE but the same thing happen.
CCS5.1, xdc 3.20.8.88, sysbios 6.31.4.27