task2.c 420 Bytes
Newer Older
1 2 3 4 5 6
#include "system.h"
#include <stdio.h>

rtems_task Task2_EntryPoint(rtems_task_argument argument)
{
    int task_no = (int) argument;
7
    task_begin(task_no);
8 9 10

    int j;
    long long int dummy = 0;
11
    for(j=0; j<500000; j++) {
12 13 14 15 16
        int k;
        for(k=0; k<100; k++)
            dummy ^= k;
        dummy++;
    }
17
    printf("[TASK %d] Computed value was %lld\n", task_no, dummy);
18
    task_end((int) argument);
19
}