Commit f30fdf3f authored by Thanassis Tsiodras's avatar Thanassis Tsiodras

Introduce a race for Coverity to find.

parent d5521483
#include "system.h"
#include <stdio.h>
// Introduce a race for Coverity to find.
unsigned g_raceMe = 0;
rtems_task Task1_EntryPoint(rtems_task_argument argument)
{
int task_no = (int) argument;
......@@ -13,6 +17,7 @@ rtems_task Task1_EntryPoint(rtems_task_argument argument)
for(k=0; k<10000; k++)
d+=1.001;
d*=1.0001;
g_raceMe++;
}
{
long result = (long) d;
......
#include "system.h"
#include <stdio.h>
// Introduce a race for Coverity to find.
extern unsigned g_raceMe;
rtems_task Task2_EntryPoint(rtems_task_argument argument)
{
int task_no = (int) argument;
......@@ -13,6 +17,7 @@ rtems_task Task2_EntryPoint(rtems_task_argument argument)
for(k=0; k<100; k++)
dummy ^= k;
dummy++;
g_raceMe++;
}
if (dummy != 500000) {
printf(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment