OSDN Git Service

Moved the junk codes to junk directory.
[kozos-expbrd/kozos_expbrd.git] / firm / junk / 03 / os / syscall.h
1 #ifndef _KOZOS_SYSCALL_H_INCLUDED_
2 #define _KOZOS_SYSCALL_H_INCLUDED_
3
4 #include "defines.h"
5 #include "interrupt.h"
6
7 /* ¥·¥¹¥Æ¥à¡¦¥³¡¼¥ëÈÖ¹æ¤ÎÄêµÁ */
8 typedef enum {
9   KZ_SYSCALL_TYPE_RUN = 0,
10   KZ_SYSCALL_TYPE_EXIT,
11   KZ_SYSCALL_TYPE_WAIT,
12   KZ_SYSCALL_TYPE_SLEEP,
13   KZ_SYSCALL_TYPE_WAKEUP,
14   KZ_SYSCALL_TYPE_GETID,
15   KZ_SYSCALL_TYPE_CHPRI,
16   KZ_SYSCALL_TYPE_KMALLOC,
17   KZ_SYSCALL_TYPE_KMFREE,
18   KZ_SYSCALL_TYPE_SEND,
19   KZ_SYSCALL_TYPE_RECV,
20   KZ_SYSCALL_TYPE_SETINTR,
21 } kz_syscall_type_t;
22
23 /* ¥·¥¹¥Æ¥à¡¦¥³¡¼¥ë¸Æ¤Ó½Ð¤·»þ¤Î¥Ñ¥é¥á¡¼¥¿³ÊǼ°è¤ÎÄêµÁ */
24 typedef struct {
25   union {
26     struct {
27       kz_func_t func;
28       char *name;
29       int priority;
30       int stacksize;
31       int argc;
32       char **argv;
33       kz_thread_id_t ret;
34     } run;
35     struct {
36       int dummy;
37     } exit;
38     struct {
39       int ret;
40     } wait;
41     struct {
42       int ret;
43     } sleep;
44     struct {
45       kz_thread_id_t id;
46       int ret;
47     } wakeup;
48     struct {
49       kz_thread_id_t ret;
50     } getid;
51     struct {
52       int priority;
53       int ret;
54     } chpri;
55     struct {
56       int size;
57       void *ret;
58     } kmalloc;
59     struct {
60       char *p;
61       int ret;
62     } kmfree;
63     struct {
64       kz_msgbox_id_t id;
65       int size;
66       char *p;
67       int ret;
68     } send;
69     struct {
70       kz_msgbox_id_t id;
71       int *sizep;
72       char **pp;
73       kz_thread_id_t ret;
74     } recv;
75     struct {
76       softvec_type_t type;
77       kz_handler_t handler;
78       int ret;
79     } setintr;
80   } un;
81 } kz_syscall_param_t;
82
83 #endif