task1.c 439 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include "system.h"
#include <stdio.h>

rtems_task Task_EntryPoint(rtems_task_argument argument)
{
    int task_no = (int) argument;
    printf("Inside task %d...\n", task_no);

    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);
}