view include/TaskManager/HTask.h @ 233:d734af296d38

fix
author gongo@localhost.localdomain
date Sun, 29 Mar 2009 21:13:17 +0900
parents 5c194c71eca8
children 9f4f99d459aa 81b25e5d5379
line wrap: on
line source

#ifndef INCLUDED_HTASK
#define INCLUDED_HTASK

#ifndef INCLUDED_BASE_H_
#  include "base.h"
#endif

#ifndef INCLUDED_TYPES
#  include "types.h"
#endif

#ifndef INCLUDED_TASK
#  include "Task.h"
#endif

#ifndef INCLUDED_TASK_QUEUE_INFO
#  include "TaskQueueInfo.h"
#endif

class TaskManagerImpl;

class HTask : public Task {
public:
    BASE_NEW_DELETE(HTask);

    TaskQueuePtr wait_me;  // List of task waiting for me
    TaskQueuePtr wait_i;   // List of task for which I am waiting
    void (*post_func)(void *);
    void *post_arg;
    CPU_TYPE cpu_type;
    HTask *next;
    TaskManagerImpl *mimpl;

    void spawn(void);
    void set_depend(HTask *);
    void set_cpu(CPU_TYPE type);
    void set_post(void (*func)(void *), void *arg);

#define wait_for set_depend
};

typedef HTask* HTaskPtr;

#endif