OSDN Git Service

first
[psychlops/cpp.git] / psychlops / core / ApplicationInterfaces / psychlops_app_thread.h
1 /*
2  *  psychlops_app_thread.h
3  *  Psychlops Standard Library (Universal)
4  *
5  *  Last Modified 208/09/22 by Kenchi HOSOKAWA
6  *  (C) 2008 Kenchi HOSOKAWA, Kazushi MARUYA, Takao SATO
7  */
8
9 #ifndef HEADER_PSYCHLOPS_APP_THREAD
10 #define HEADER_PSYCHLOPS_APP_THREAD
11
12
13
14 namespace Psychlops {
15
16 namespace Prototype {
17
18         class Thread {
19         protected:
20                 char memory[32];
21         public:
22                 enum Priority { HIGH=0, NORMAL, LOW, IDLE, SLEEP };
23                 
24                 Thread();
25                 Thread(void (*func)());
26                 virtual ~Thread();
27                 virtual void create(void (*func)());
28                 static void yield();
29                 static void sleep(int microsec);
30                 static Priority priority();
31                 static void priority(Priority p);
32
33         };
34 }
35
36 }       /*      <- namespace Psychlops  */
37
38
39 #endif