Skip to content

Commit af5d07d

Browse files
committed
Apps: Build fix after 6a1d169
1 parent 467dcbc commit af5d07d

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed

src/apps/mpdemo.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ static void s_printString (U32 row, U32 col, U32 bgcolor, U32 fgcolor, char* tex
3333
{
3434
syscall (OSIF_SYSCALL_CONSOLE_SETCOLOR, bgcolor, fgcolor, 0, 0, 0);
3535
syscall (OSIF_SYSCALL_CONSOLE_SETCURSORPOS, row, col, 0, 0, 0);
36-
os_putstr (text);
36+
cm_putstr (text);
3737
}
3838

3939
void s_progressbar (UINT delay_ms, char* title, UINT row, UINT color)
@@ -44,32 +44,32 @@ void s_progressbar (UINT delay_ms, char* title, UINT row, UINT color)
4444

4545
for (UINT i = 0; i < max; i++) {
4646
s_printString (row + 2, i, color, DARK_GRAY, " ");
47-
delay (delay_ms);
47+
cm_delay (delay_ms);
4848
}
4949
}
5050

5151
void proc_main()
5252
{
53-
os_thread_create (thread0, false);
54-
os_thread_create (&thread1, false);
53+
cm_thread_create (thread0, false);
54+
cm_thread_create (&thread1, false);
5555

5656
s_progressbar (200, "Process 0:\n", 26, RED);
5757

5858
s_progressbar (20, "Process 0:\n", 26, RED);
5959

60-
os_process_kill(1);
60+
cm_process_kill(1);
6161
s_printString (37, 0, BLACK, WHITE,
6262
"Cannot kill process 0. Make kernel thread slower for demo.");
6363
}
6464

6565
void thread0()
6666
{
6767
s_progressbar (10, "Thread 0:\n", 30, GREEN);
68-
os_process_kill(2);
68+
cm_process_kill(2);
6969
}
7070

7171
void thread1()
7272
{
7373
s_progressbar (5, "Thread 1:\n", 34, YELLOW);
74-
os_process_kill(3);
74+
cm_process_kill(3);
7575
}

src/apps/proc1.c

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,28 @@ void another_thread();
55

66
void proc_main()
77
{
8-
os_putstr("\n Process 0 - Running");
9-
os_putstr("\n Process 0 - Creating Thread 1");
10-
os_thread_create(another_thread, false);
8+
cm_putstr("\n Process 0 - Running");
9+
cm_putstr("\n Process 0 - Creating Thread 1");
10+
cm_thread_create(another_thread, false);
1111

1212
for (int i = 0; i < 2; i++) {
13-
os_putstr("\n Process 0 - Yielding");
14-
os_yield();
15-
os_putstr("\n Process 0 - Running");
13+
cm_putstr("\n Process 0 - Yielding");
14+
cm_process_yield();
15+
cm_putstr("\n Process 0 - Running");
1616
}
1717

18-
os_putstr("\n Process 0 - Exiting");
19-
os_process_kill(1);
20-
os_putstr("\n Process 0 - Not exited. Its is the only one.");
18+
cm_putstr("\n Process 0 - Exiting");
19+
cm_process_kill(1);
20+
cm_putstr("\n Process 0 - Not exited. Its is the only one.");
2121
}
2222

2323
void another_thread()
2424
{
25-
os_putstr("\n Thread 1 - Running");
26-
os_putstr("\n Thread 1 - Yielding");
27-
os_yield();
25+
cm_putstr("\n Thread 1 - Running");
26+
cm_putstr("\n Thread 1 - Yielding");
27+
cm_process_yield();
2828

29-
os_putstr("\n Thread 1 - Running");
30-
os_putstr("\n Thread 1 - Exiting");
31-
os_process_kill(2);
29+
cm_putstr("\n Thread 1 - Running");
30+
cm_putstr("\n Thread 1 - Exiting");
31+
cm_process_kill(2);
3232
}

0 commit comments

Comments
 (0)