view example/renew_task/spe/RenewStart.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 b89ba1d96fff
children 63741e2dc6cb
line wrap: on
line source

#include <stdio.h>
#include "RenewStart.h"
#include "SpeProfile.h"
#include "Func.h"

/* これは必須 */
SchedDefineTask(RenewStart);

static int
run(SchedTask *s, void *rbuf, void *wbuf)
{
    s->printf("[SPE] ** running RenewStart\n");
    
    void *tmp =  s->global_alloc(sizeof(SpeProfile), 0);
    // overlay で動くの?
    SpeProfile *profile = new (tmp) SpeProfile;

    s->printf("[SPE] Create Task : Renew1\n");
    TaskPtr nextTask =  s->create_task(RENEW1);
    s->wait_task(nextTask);
    
    s->printf("[SPE] ** finish  RenewStart\n\n");

    profile->ProfStart();

    return 0;
}