Skip to content

Commit 017a0f1

Browse files
author
Yuma Arakawa
committed
未使用の変数・関数宣言を削除
1 parent 2ae144d commit 017a0f1

File tree

5 files changed

+3
-46
lines changed

5 files changed

+3
-46
lines changed

kernel/include/shell_init.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,4 @@
66
#define SHELL_GDT_IDX 4
77
#define SHELL_ID 1
88

9-
extern unsigned char shell_context_switch[CONTEXT_SWITCH_FN_SIZE];
10-
11-
void shell_init(void);
12-
139
#endif /* _SHELL_INIT_H_ */

kernel/include/uptime_init.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,4 @@
66
#define UPTIME_GDT_IDX 5
77
#define UPTIME_ID 2
88

9-
extern unsigned char uptime_context_switch[CONTEXT_SWITCH_FN_SIZE];
10-
11-
void uptime_init(void);
12-
139
#endif /* _UPTIME_INIT_H_ */

kernel/main.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,7 @@ static void task_init(unsigned short task_id,
8686
struct page_directory_entry *pd_base_addr,
8787
struct page_table_entry *pt_base_addr,
8888
unsigned int phys_binary_base,
89-
unsigned int phys_stack_base,
90-
void (*context_switch_fn)(void))
89+
unsigned int phys_stack_base)
9190
{
9291
struct page_directory_entry *pde;
9392
struct page_table_entry *pte;
@@ -206,11 +205,9 @@ int main(void)
206205
/* Setup tasks */
207206
kern_task_init();
208207
task_init(SHELL_ID, (struct page_directory_entry *)0x00091000,
209-
(struct page_table_entry *)0x00092000, 0x00011000, 0x00070000,
210-
(void (*)(void))shell_context_switch);
208+
(struct page_table_entry *)0x00092000, 0x00011000, 0x00070000);
211209
task_init(UPTIME_ID, (struct page_directory_entry *)0x00093000,
212-
(struct page_table_entry *)0x00094000, 0x00012000, 0x00071000,
213-
(void (*)(void))uptime_context_switch);
210+
(struct page_table_entry *)0x00094000, 0x00012000, 0x00071000);
214211

215212
/* Start paging */
216213
mem_page_start();

kernel/shell_init.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,3 @@
66

77
#define APP_ENTRY_POINT 0x20000000
88
#define APP_STACK_BASE 0x20002000
9-
10-
/*
11-
00000000 <shell_context_switch>:
12-
0: 55 push %ebp
13-
1: 89 e5 mov %esp,%ebp
14-
3: ea 00 00 00 00 20 00 ljmp $0x20,$0x0
15-
a: 5d pop %ebp
16-
b: c3 ret
17-
*/
18-
unsigned char shell_context_switch[CONTEXT_SWITCH_FN_SIZE] = {
19-
0x55,
20-
0x89, 0xe5,
21-
0xea, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00,
22-
0x5d,
23-
0xc3
24-
};

kernel/uptime_init.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,3 @@
66

77
#define APP_ENTRY_POINT 0x20000000
88
#define APP_STACK_BASE 0x20002000
9-
10-
/*
11-
00000000 <uptime_context_switch>:
12-
0: 55 push %ebp
13-
1: 89 e5 mov %esp,%ebp
14-
3: ea 00 00 00 00 28 00 ljmp $0x28,$0x0
15-
a: 5d pop %ebp
16-
b: c3 ret
17-
*/
18-
unsigned char uptime_context_switch[CONTEXT_SWITCH_FN_SIZE] = {
19-
0x55,
20-
0x89, 0xe5,
21-
0xea, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00,
22-
0x5d,
23-
0xc3
24-
};

0 commit comments

Comments
 (0)