FreeRTOS_Support.c
bool bRtosVerifyState(const EventBits_t uxTaskMask) {
	// step 1: if task is meant to delete/terminate, inform it as such
	if ((xEventGroupGetBits(TaskDeleteState) & uxTaskMask) == uxTaskMask) {
		return 0;
	}
	// step 2: if not meant to terminate, check if/wait until enabled to run again
	xEventGroupWaitBits(TaskRunState, uxTaskMask, pdFALSE, pdTRUE, portMAX_DELAY) ;
	// step 3: since now definitely enabled to run, check for delete state again
	return ((xEventGroupGetBits(TaskDeleteState) & uxTaskMask) == uxTaskMask) ? 0 : 1 ;
}
/**
 * check if a task should a) terminate or b) run
 * @brief	if, at entry, set to terminate immediately return result
 * 			if not, wait (possibly 0 ticks) for run status
 *			Before returning, again check if set to terminate.
 * @param	uxTaskMask - specific task bitmap
 * @return	0 if task should delete, 1 if it should run...
 */
check if a task should a) terminate or b) run
@brief       if, at entry, set to terminate immediately return result
if not, wait (possibly 0 ticks) for run status
Before returning, again check if set to terminate.
@param       uxTaskMask - specific task bitmap
@return      0 if task should delete, 1 if it should run
check if a task should a ) terminate or b ) run @brief if at entry set to terminate immediately return result if not wait ( possibly 0 ticks ) for run status Before returning again check if set to terminate . @param uxTaskMask - specific task bitmap @return 0 if task should delete 1 if it should run
bool bRtosVerifyState(const EventBits_t uxTaskMask) {
	if ((xEventGroupGetBits(TaskDeleteState) & uxTaskMask) == uxTaskMask) {
		return 0;
	}
	xEventGroupWaitBits(TaskRunState, uxTaskMask, pdFALSE, pdTRUE, portMAX_DELAY) ;
	return ((xEventGroupGetBits(TaskDeleteState) & uxTaskMask) == uxTaskMask) ? 0 : 1 ;
}
bool bRtosVerifyState ( const EventBits_t uxTaskMask ) { if ( ( xEventGroupGetBits ( TaskDeleteState ) & uxTaskMask ) == uxTaskMask ) { return 0 ; } xEventGroupWaitBits ( TaskRunState , uxTaskMask , pdFALSE , pdTRUE , portMAX_DELAY ) ; return ( ( xEventGroupGetBits ( TaskDeleteState ) & uxTaskMask ) == uxTaskMask ) ? 0 : 1 ; }
check if a task should a) terminate or b) run
 @brief       if, at entry, set to terminate immediately return result
                      if not, wait (possibly 0 ticks) for run status
                      Before returning, again check if set to terminate.
check if a task should a ) terminate or b ) run @brief if at entry set to terminate immediately return result if not wait ( possibly 0 ticks ) for run status Before returning again check if set to terminate .
// step 1: if task is meant to delete/terminate, inform it as such // step 2: if not meant to terminate, check if/wait until enabled to run again // step 3: since now definitely enabled to run, check for delete state again