task1.c 438 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 "printk.h"

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

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