4 * Created on: 2011/05/07
12 #include "interrupt.h"
14 typedef int (*pinoc_func_t)(void);
15 typedef void (*pinoc_handler_t)(void);
20 PINOC_SYSCALL_RUN = 0,
36 // pinoc_thread_id_t ret;
44 }pinoc_syscall_param_t;
46 /********************************************************************************
48 ********************************************************************************/
50 #define THREAD_NAME_SIZE 15
52 // ユーザー毎のコンテキストが保存されたスタックポインタ
53 typedef struct _pinoc_context
61 typedef struct _pinoc_thread
63 struct _pinoc_thread* next; // レディーキュー
64 char name[THREAD_NAME_SIZE + 1]; // スレッド名
69 pinoc_func_t func; // 関数名
76 pinoc_syacall_t type; // システムコールの種類
77 pinoc_syscall_param_t param; // システみコールの引数
80 pinoc_context context; // このスレッドのコンテキスト情報
94 /********************************************************************************
96 ********************************************************************************/
98 //void pinoc_run(pinoc_func_t func, char *name, int stack_size, int argc, char* argv[]);
102 void pinoc_start(pinoc_func_t func, char *name, int stack_size, int argc, char* argv[]);
103 //void pinoc_syserr();
104 //void pinoc_syscall(pinoc_syscall_type_t type, pinoc_syscall_param_t* param);
107 int test08_1_main(int argc, char* argv[]);
109 //static pinoc_handler_t handlers[softvec];
112 * ディスパッチの内容は外部ファイルにアセンブラで記述してある
114 void dispatch(pinoc_context* context);
117 #endif /* PINOC_H_ */