view example/get_segment/spe/Hello.cc @ 467:44c0bce54dcf

fix all examples. test_render is not working now.
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Thu, 01 Oct 2009 19:25:25 +0900
parents 4fa8760e18c2
children 7777761e8e02
line wrap: on
line source

#include <stdio.h>
#include "Hello.h"
#include "Func.h"

/* これは必須 */
SchedDefineDynamicTask(Hello,0);

static int
run(SchedTask *smanager, void *rbuf, void *wbuf)
{
    int task_id = smanager->get_param(0);

    unsigned int pc;
    __asm__ __volatile__(
"         brsl %0,____LLLL\n"
"____LLLL:"
        : "=r" (pc));

    smanager->fprintf(smanager->stderr_,"[%d] Hello, World!! Seg1 \n", task_id);
    smanager->fprintf(smanager->stderr_,"pc=0x%0x 0x%0x\n",pc, (unsigned int)&runTask_Hello);

    return 0;
}