view src/pthread/ThreadManager.h @ 13:f06fb0370caf

add pthread code that has not been debuged yet.
author kent <kent@cr.ie.u-ryukyu.ac.jp>
date Fri, 08 Jan 2010 20:00:01 +0900
parents
children 5f65da34f4f3
line wrap: on
line source

#ifndef _THREADMANAGER_H
#define _THREADMANAGER_H
#include <pthread.h>
#include <List.h>
#include <Queue.h>

typedef struct _ThreadManager {
	pthread_t thread;
	int thread_id;
	int finishFlag;

	// These Queue should be changed to Blocking-Queue.
	// Now, when the thread has no task, he wait by busy loop.
	Queue newtaskQ;
	Queue finishtaskQ;

	List schedTasks;
	SchedTask running;

	struct _UserManager *user;
} ThreadManager;

#endif /* _THREADMANAGER_H */