GadgetSeed
0.9.6
syscall_param.h
[詳解]
1
/** @file
2
@brief システムコールパラメータ定義
3
4
@date 2017.11.25
5
@author Takashi SHUDO
6
*/
7
8
#ifndef SYSCALL_PARAM_H
9
#define SYSCALL_PARAM_H
10
11
#define SYSCALL_DISPATCH 0
12
#define SYSCALL_TASK_ADD 1
13
#define SYSCALL_TASK_EXEC 2
14
#define SYSCALL_TASK_EXIT 3
15
#define SYSCALL_TASK_PAUSE 4
16
#define SYSCALL_TASK_SLEEP 5
17
#define SYSCALL_TASK_KILL 6
18
#define SYSCALL_TASK_WAKEUP 7
19
20
#define SYSCALL_EVTQUE_INIT 8
21
#define SYSCALL_EVTQUE_WAIT 9
22
#define SYSCALL_EVTQUE_PUSH 10
23
#define SYSCALL_EVTQUE_CLEAR 11
24
#define SYSCALL_EVTQUE_CHECK 12
25
#define SYSCALL_EVTQUE_WAKEUP 13
26
#define SYSCALL_EVTQUE_DISPOSE 14
27
28
#define SYSCALL_MUTEX_INIT 15
29
#define SYSCALL_MUTEX_LOCK 16
30
#define SYSCALL_MUTEX_UNLOCK 17
31
#define SYSCALL_MUTEX_DISPOSE 18
32
33
#define SYSCALL_SET_CONSOLE_IN 19
34
#define SYSCALL_SET_CONSOLE_OUT 20
35
#define SYSCALL_SET_ERROR_OUT 21
36
37
#define SYSCALL_TIMEOUT_WAKEUP 22 // システムコールではない
38
39
#define SYSCALL_PRINT_TASK_LIST 23
40
#define SYSCALL_PRINT_TASK_QUEUE 24
41
#define SYSCALL_PRINT_CALLTRACE 25
42
#define SYSCALL_GET_TASKS_INFO 26
43
44
struct
exec_task_param
{
45
task_func
func;
46
char
*name;
47
int
priority;
48
struct
st_tcb
*tcb;
49
unsigned
int
*stack;
50
int
stack_size
;
51
char
*
arg
;
52
int
ret;
53
};
///< タスク追加、起動用システムコールパラメータ
54
55
struct
evtque_param
{
56
struct
st_event
*evtque;
57
unsigned
int
timeout;
58
const
char
*
name
;
59
void
*arg;
60
unsigned
int
size
;
61
int
count;
62
int
ret;
63
};
///< イベント用システムコールパラメータ
64
65
struct
mutex_param
{
66
struct
st_mutex
*mutex;
67
unsigned
int
timeout;
68
const
char
*
name
;
69
int
ret;
70
};
///< MUTEX用システムコールパラメータ
71
72
struct
st_task_info_param
{
73
struct
st_task_info
*ti;
74
int
count;
75
int
ret;
76
};
///< タスク情報取得用システムコールパラメータ
77
78
extern
const
char
syscall_name[][16];
79
extern
int
last_syscall_type;
80
81
void
sys_call(
int
type,
void
*param);
82
83
#endif // SYSCALL_PARAM_H
st_task_info
タスク情報
Definition:
task.h:36
st_tcb::arg
char * arg
タスク実行時引数文字列
Definition:
tcb.h:46
exec_task_param
タスク追加、起動用システムコールパラメータ
Definition:
syscall_param.h:44
task_func
int(* task_func)(char *arg)
タスク関数
Definition:
tcb.h:25
st_mutex
MUTEX
Definition:
mutex.h:13
st_event
イベント
Definition:
event.h:15
st_tcb::stack_size
unsigned int stack_size
スタックサイズ
Definition:
tcb.h:42
st_event::name
const char * name
イベント名文字列
Definition:
event.h:20
evtque_param
イベント用システムコールパラメータ
Definition:
syscall_param.h:55
mutex_param
MUTEX用システムコールパラメータ
Definition:
syscall_param.h:65
st_task_info_param
タスク情報取得用システムコールパラメータ
Definition:
syscall_param.h:72
st_event::size
unsigned int size
1イベントのサイズ
Definition:
event.h:19
st_tcb
タスクコンテキスト
Definition:
tcb.h:32
st_mutex::name
const char * name
MUTEX名文字列
Definition:
mutex.h:17
kernel
task
syscall_param.h
構築:
1.8.13