task1.c 460 Bytes
Newer Older
1 2 3
#include "system.h"
#include <stdio.h>

4
rtems_task Task1_EntryPoint(rtems_task_argument argument)
5 6 7
{
    int task_no = (int) argument;
    printf("Inside task %d...\n", task_no);
8
    fflush(stdout);
9 10 11 12 13 14 15 16 17 18 19 20

    int j;
    double d=task_no;
    for(j=0; j<10000; j++) {
        int k;
        for(k=0; k<10000; k++)
            d+=1.001;
        d*=1.0001;
    }
    printf("Computed value by task %d was %ld\n", task_no, (long)d);
    rtems_task_delete(RTEMS_SELF);
}