view example/string_args/ppe/Exec.cc @ 1790:6790d1d83bb7 draft

change iterator to spawn in string_args
author Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
date Tue, 03 Dec 2013 22:00:56 +0900
parents 7245548995a8
children 2cf6b9020b06
line wrap: on
line source

#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <sys/stat.h>
#include <iostream>
#include <vector>
#include <cstdlib>

#include "SchedTask.h"
#include "Exec.h"
#include "Func.h"

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



static int
run(SchedTask *s, void *rbuf, void *wbuf)
{
    const char *search_word1 = (char *)s->get_input(rbuf,0);
    const char *search_word2 = (char *)s->get_input(rbuf,1);
    const int *table = (int *)s->get_input(rbuf,2);

    long task_size = (long)s->get_param(0);

    //s->xはiteraterで繰り返した数

    s->printf("test num  : %d\n",task_size);
    s->printf("arg1 word : %s\n",search_word1);
    s->printf("arg2 word : %s\n",search_word2);

    return 0;
}