Mercurial > hg > Game > Cerium
view TaskManager/kernel/ppe/Threads.h @ 1561:e8c9a7099bcc draft
add set NDRange param
author | Yuhi TOMARI <yuhi@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 12 Mar 2013 16:52:49 +0900 |
parents | 622a7d053537 |
children | 8ee897303cd0 |
line wrap: on
line source
#ifndef INCLUDED_THREADS #define INCLUDED_THREADS #include <pthread.h> #include "base.h" #include "types.h" class Threads { public: BASE_NEW_DELETE(Threads); /* constructor */ Threads(int num = 1) {}; virtual ~Threads() {}; /* functions */ virtual void init() = 0; virtual int get_mail(int speid, int count, memaddr *ret) = 0; // BLOCKING virtual int has_mail(int speid, int count, memaddr *ret) = 0; // NONBLOCK virtual void send_mail(int speid, int num, memaddr *data) = 0; // BLOCKING virtual void add_output_tasklist(int command, memaddr buff, int alloc_size) = 0; virtual int is_gpu(int cpuid) { return 0; } virtual void set_NDRange(void* ndr)=0; /* variables */ pthread_t *threads; int cpu_num; } ; #endif