\r
/* A block time of zero simply means "don't block". */\r
#define ebDONT_BLOCK ( 0 )\r
+#define ebONE_TICK ( ( TickType_t ) 1 )\r
\r
/* A 5ms delay. */\r
#define ebSHORT_DELAY pdMS_TO_TICKS( ( TickType_t ) 5 )\r
/* Set the bit that indicates this task is at the synchronisation\r
point. The first time this is done the 'test master' task has a lower\r
priority than this task so this task will get to the sync point before\r
- the set bits task. */\r
+ the set bits task - test this by first calling xEventGroupSync() with\r
+ a zero block time, and a block time that is too short for the other\r
+ task, before calling again with a max delay - the first two calls should\r
+ return before the rendezvous completes, the third only after the\r
+ rendezvous is complete. */\r
+ uxReturned = xEventGroupSync( xEventGroup, /* The event group used for the synchronisation. */\r
+ uxSynchronisationBit, /* The bit to set in the event group to indicate this task is at the sync point. */\r
+ ebALL_SYNC_BITS,/* The bits to wait for - these bits are set by the other tasks taking part in the sync. */\r
+ ebDONT_BLOCK ); /* The maximum time to wait for the sync condition to be met before giving up. */\r
+\r
+ /* No block time was specified, so as per the comments above, the\r
+ rendezvous is not expected to have completed yet. */\r
+ configASSERT( ( uxReturned & ebALL_SYNC_BITS ) != ebALL_SYNC_BITS );\r
+\r
+ uxReturned = xEventGroupSync( xEventGroup, /* The event group used for the synchronisation. */\r
+ uxSynchronisationBit, /* The bit to set in the event group to indicate this task is at the sync point. */\r
+ ebALL_SYNC_BITS, /* The bits to wait for - these bits are set by the other tasks taking part in the sync. */\r
+ ebONE_TICK ); /* The maximum time to wait for the sync condition to be met before giving up. */\r
+\r
+ /* A short block time was specified, so as per the comments above, the\r
+ rendezvous is not expected to have completed yet. */\r
+ configASSERT( ( uxReturned & ebALL_SYNC_BITS ) != ebALL_SYNC_BITS );\r
+\r
uxReturned = xEventGroupSync( xEventGroup, /* The event group used for the synchronisation. */\r
uxSynchronisationBit, /* The bit to set in the event group to indicate this task is at the sync point. */\r
ebALL_SYNC_BITS,/* The bits to wait for - these bits are set by the other tasks taking part in the sync. */\r