view example/send_args/ppe/Exec.cc @ 2048:6796d85f3d6b draft

remove error
author Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
date Thu, 28 Jan 2016 00:05:49 +0900
parents 3babb36ac459
children
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)
{
    char *receive_word = (char *)s->get_input(rbuf,0);
    int *intTable = (int *)s->get_input(rbuf,1);
    int intTable_size = (int)s->get_inputSize(1);

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

    //s->xはiteraterで繰り返した数
    for(int i = 0; i < intTable_size;i++){
        s->printf("%d ",intTable[i]);
    }
    s->printf("\n");

    s->printf("task number: %d\n",task_number + 1);
    s->printf("args       : %s\n",receive_word);


    return 0;
}