Mercurial > hg > Members > kono > Cerium
view TaskManager/kernel/ppe/CpuThreads.h @ 885:d0273488f50c
fix
author | Yutaka_Kinjyo |
---|---|
date | Tue, 13 Jul 2010 16:23:04 +0900 |
parents | 4e8fc627ed33 |
children |
line wrap: on
line source
#ifndef INCLUDED_CPU_THREADS #define INCLUDED_CPU_THREADS #include <pthread.h> #include "Threads.h" #include "TaskManagerImpl.h" #include "MainScheduler.h" typedef struct cpu_arg { int cpuid; // should be syncrhonized MainScheduler *scheduler; TaskManagerImpl *manager; } cpu_thread_arg_t; class CpuThreads : Threads { public: /* constructor */ CpuThreads(int num = 1, int start_id = 0); virtual ~CpuThreads(); static void *cpu_thread_run(void *args); /* functions */ void init(); int get_mail(int speid, int count, memaddr *ret); // BLOCKING int has_mail(int speid, int count, memaddr *ret); // NONBLOCK void send_mail(int speid, int num, memaddr *data); // BLOCKING private: /* variables */ pthread_t *threads; cpu_thread_arg_t *args; int cpu_num; int id_offset; }; #endif