listSET_LIST_ITEM_OWNER( &( pxCoRoutine->xEventListItem ), pxCoRoutine );\r
\r
/* Event lists are always in priority order. */\r
- listSET_LIST_ITEM_VALUE( &( pxCoRoutine->xEventListItem ), configMAX_PRIORITIES - ( portTickType ) uxPriority );\r
+ listSET_LIST_ITEM_VALUE( &( pxCoRoutine->xEventListItem ), ( ( portTickType ) configMAX_CO_ROUTINE_PRIORITIES - ( portTickType ) uxPriority ) );\r
\r
/* Now the co-routine has been initialised it can be added to the ready\r
list at the correct priority. */\r