fix missing loop
This commit is contained in:
parent
cc6a51574b
commit
45dec7fb56
@ -172,41 +172,53 @@ static unsigned char get_average( void )
|
||||
|
||||
static void prvSamplerTask( void * pvParameters )
|
||||
{
|
||||
for (int i=0; i<WORK_SET_SIZE; i++)
|
||||
{WORK_SET[i]=fuzz_input_next();}
|
||||
xTaskNotifyGive(xReplA);
|
||||
xTaskNotifyGive(xReplB);
|
||||
while (1)
|
||||
{
|
||||
for (int i=0; i<WORK_SET_SIZE; i++)
|
||||
{WORK_SET[i]=fuzz_input_next();}
|
||||
xTaskNotifyGive(xReplA);
|
||||
xTaskNotifyGive(xReplB);
|
||||
}
|
||||
}
|
||||
volatile char A_WILL_FAIL = 1;
|
||||
static void prvReplicaA( void * pvParameters )
|
||||
{
|
||||
ulTaskNotifyTake(pdTRUE,portMAX_DELAY);
|
||||
unsigned char tmp = get_average();
|
||||
if (tmp % 11 == 0 && A_WILL_FAIL)
|
||||
while (1)
|
||||
{
|
||||
A_WILL_FAIL--;
|
||||
tmp+=1;
|
||||
ulTaskNotifyTake(pdTRUE,portMAX_DELAY);
|
||||
unsigned char tmp = get_average();
|
||||
if (tmp % 11 == 0 && A_WILL_FAIL)
|
||||
{
|
||||
A_WILL_FAIL--;
|
||||
tmp+=1;
|
||||
}
|
||||
int sum = count_up(tmp);
|
||||
xQueueSend( xQueueOutputA, &sum, portMAX_DELAY );
|
||||
}
|
||||
int sum = count_up(tmp);
|
||||
xQueueSend( xQueueOutputA, &sum, portMAX_DELAY );
|
||||
}
|
||||
static void prvReplicaB( void * pvParameters )
|
||||
{
|
||||
ulTaskNotifyTake(pdTRUE,portMAX_DELAY);
|
||||
unsigned char tmp = get_average();
|
||||
if (tmp % 12 == 0)
|
||||
while (1)
|
||||
{
|
||||
tmp+=2;
|
||||
ulTaskNotifyTake(pdTRUE,portMAX_DELAY);
|
||||
unsigned char tmp = get_average();
|
||||
if (tmp % 12 == 0)
|
||||
{
|
||||
tmp+=2;
|
||||
}
|
||||
int sum = count_up(tmp);
|
||||
xQueueSend( xQueueOutputB, &sum, portMAX_DELAY );
|
||||
}
|
||||
int sum = count_up(tmp);
|
||||
xQueueSend( xQueueOutputB, &sum, portMAX_DELAY );
|
||||
}
|
||||
static void prvReplicaC( void * pvParameters )
|
||||
{
|
||||
ulTaskNotifyTake(pdTRUE,portMAX_DELAY);
|
||||
unsigned char tmp = get_average();
|
||||
int sum = count_up(tmp);
|
||||
xQueueSend( xQueueOutputC, &sum, portMAX_DELAY );
|
||||
while (1)
|
||||
{
|
||||
ulTaskNotifyTake(pdTRUE,portMAX_DELAY);
|
||||
unsigned char tmp = get_average();
|
||||
int sum = count_up(tmp);
|
||||
xQueueSend( xQueueOutputC, &sum, portMAX_DELAY );
|
||||
}
|
||||
}
|
||||
static void prvVoterTask( void * pvParameters )
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user