-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
370 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
A ?= rust/helloworld | ||
AX_ROOT ?= $(PWD)/.arceos | ||
AX_ROOT ?= ../arceos | ||
|
||
APP := $(A) | ||
ifeq ($(filter /%,$(A)),) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[package] | ||
name = "wait_queue" | ||
version = "0.1.0" | ||
edition = "2021" | ||
authors = ["Keyang Hu <[email protected]>"] | ||
description = "A simple demo to test the wait queue for tasks under ArceOS" | ||
|
||
[dependencies] | ||
axstd = { workspace = true, features = ["multitask", "irq"], optional = true } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
smp = 1 | ||
build_mode = release | ||
log_level = info | ||
|
||
Primary CPU 0 started, | ||
Found physcial memory regions: | ||
.text (READ | EXECUTE | RESERVED) | ||
.rodata (READ | RESERVED) | ||
.data .tdata .tbss .percpu (READ | WRITE | RESERVED) | ||
.percpu (READ | WRITE | RESERVED) | ||
boot stack (READ | WRITE | RESERVED) | ||
.bss (READ | WRITE | RESERVED) | ||
free memory (READ | WRITE | FREE) | ||
Initialize global memory allocator... | ||
Initialize platform devices... | ||
Initialize scheduling... | ||
use FIFO scheduler. | ||
Initialize interrupt handlers... | ||
Primary CPU 0 init OK. | ||
Hello, main task | ||
wait_queue: test_wait() | ||
task TaskId(2) is waiting for tasks to start... | ||
task TaskId(2) is waiting for tasks to finish... | ||
wait_queue: test_wait() OK! | ||
wait_timeout_until: tests begin | ||
wait_timeout_until: test tasks woken up by notification, spawn 16 tasks... | ||
wait_timeout_until: sleep for 100ms to let all tasks start | ||
wait_timeout_until: wake up all tasks who are waiting for timeout through notification | ||
wait_timeout_until: tasks woken up by notification test OK! | ||
wait_timeout_until: test tasks woken up by timeout, spawn 16 tasks... | ||
wait_timeout_until: wait for all tasks to finish | ||
wait_timeout_until: tasks woken up by timeout test OK! | ||
wait_timeout_until: test tasks woken up by notification or timeout, spawn 16 tasks... | ||
wait_timeout_until: test tasks woken up by notification or timeout, test OK! | ||
wait_timeout_until: all tests OK! | ||
Shutting down... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
smp = 4 | ||
build_mode = release | ||
log_level = info | ||
|
||
CPU 0 started | ||
Found physcial memory regions: | ||
.text (READ | EXECUTE | RESERVED) | ||
.rodata (READ | RESERVED) | ||
.data .tdata .tbss .percpu (READ | WRITE | RESERVED) | ||
.percpu (READ | WRITE | RESERVED) | ||
boot stack (READ | WRITE | RESERVED) | ||
.bss (READ | WRITE | RESERVED) | ||
free memory (READ | WRITE | FREE) | ||
Initialize global memory allocator... | ||
Initialize platform devices... | ||
Initialize scheduling... | ||
use Completely Fair scheduler. | ||
Initialize interrupt handlers... | ||
CPU 0 init OK | ||
CPU 1 started | ||
CPU 2 started | ||
CPU 3 started | ||
CPU 1 init OK | ||
CPU 2 init OK | ||
CPU 3 init OK | ||
Hello, main task | ||
wait_queue: test_wait() | ||
task TaskId(2) is waiting for tasks to start... | ||
task TaskId(2) is waiting for tasks to finish... | ||
wait_queue: test_wait() OK! | ||
wait_timeout_until: tests begin | ||
wait_timeout_until: test tasks woken up by notification, spawn 16 tasks... | ||
wait_timeout_until: sleep for 100ms to let all tasks start | ||
wait_timeout_until: wake up all tasks who are waiting for timeout through notification | ||
wait_timeout_until: tasks woken up by notification test OK! | ||
wait_timeout_until: test tasks woken up by timeout, spawn 16 tasks... | ||
wait_timeout_until: wait for all tasks to finish | ||
wait_timeout_until: tasks woken up by timeout test OK! | ||
wait_timeout_until: test tasks woken up by notification or timeout, spawn 16 tasks... | ||
wait_timeout_until: test tasks woken up by notification or timeout, test OK! | ||
wait_timeout_until: all tests OK! | ||
Shutting down... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
smp = 4 | ||
build_mode = release | ||
log_level = info | ||
|
||
Primary CPU 0 started, | ||
Found physcial memory regions: | ||
.text (READ | EXECUTE | RESERVED) | ||
.rodata (READ | RESERVED) | ||
.data .tdata .tbss .percpu (READ | WRITE | RESERVED) | ||
.percpu (READ | WRITE | RESERVED) | ||
boot stack (READ | WRITE | RESERVED) | ||
.bss (READ | WRITE | RESERVED) | ||
free memory (READ | WRITE | FREE) | ||
Initialize global memory allocator... | ||
Initialize platform devices... | ||
Initialize scheduling... | ||
use FIFO scheduler. | ||
Initialize interrupt handlers... | ||
CPU 0 init OK | ||
CPU 1 started | ||
CPU 2 started | ||
CPU 3 started | ||
CPU 1 init OK | ||
CPU 2 init OK | ||
CPU 3 init OK | ||
Hello, main task | ||
wait_queue: test_wait() | ||
task TaskId(2) is waiting for tasks to start... | ||
task TaskId(2) is waiting for tasks to finish... | ||
wait_queue: test_wait() OK! | ||
wait_timeout_until: tests begin | ||
wait_timeout_until: test tasks woken up by notification, spawn 16 tasks... | ||
wait_timeout_until: sleep for 100ms to let all tasks start | ||
wait_timeout_until: wake up all tasks who are waiting for timeout through notification | ||
wait_timeout_until: tasks woken up by notification test OK! | ||
wait_timeout_until: test tasks woken up by timeout, spawn 16 tasks... | ||
wait_timeout_until: wait for all tasks to finish | ||
wait_timeout_until: tasks woken up by timeout test OK! | ||
wait_timeout_until: test tasks woken up by notification or timeout, spawn 16 tasks... | ||
wait_timeout_until: test tasks woken up by notification or timeout, test OK! | ||
wait_timeout_until: all tests OK! | ||
Shutting down... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
smp = 4 | ||
build_mode = release | ||
log_level = info | ||
|
||
Primary CPU 0 started, | ||
Found physcial memory regions: | ||
.text (READ | EXECUTE | RESERVED) | ||
.rodata (READ | RESERVED) | ||
.data .tdata .tbss .percpu (READ | WRITE | RESERVED) | ||
.percpu (READ | WRITE | RESERVED) | ||
boot stack (READ | WRITE | RESERVED) | ||
.bss (READ | WRITE | RESERVED) | ||
free memory (READ | WRITE | FREE) | ||
Initialize global memory allocator... | ||
Initialize platform devices... | ||
Initialize scheduling... | ||
use Round-robin scheduler. | ||
Initialize interrupt handlers... | ||
CPU 0 init OK | ||
CPU 1 started | ||
CPU 2 started | ||
CPU 3 started | ||
CPU 1 init OK | ||
CPU 2 init OK | ||
CPU 3 init OK | ||
Hello, main task | ||
wait_queue: test_wait() | ||
task TaskId(2) is waiting for tasks to start... | ||
task TaskId(2) is waiting for tasks to finish... | ||
wait_queue: test_wait() OK! | ||
wait_timeout_until: tests begin | ||
wait_timeout_until: test tasks woken up by notification, spawn 16 tasks... | ||
wait_timeout_until: sleep for 100ms to let all tasks start | ||
wait_timeout_until: wake up all tasks who are waiting for timeout through notification | ||
wait_timeout_until: tasks woken up by notification test OK! | ||
wait_timeout_until: test tasks woken up by timeout, spawn 16 tasks... | ||
wait_timeout_until: wait for all tasks to finish | ||
wait_timeout_until: tasks woken up by timeout test OK! | ||
wait_timeout_until: test tasks woken up by notification or timeout, spawn 16 tasks... | ||
wait_timeout_until: test tasks woken up by notification or timeout, test OK! | ||
wait_timeout_until: all tests OK! | ||
Shutting down... |
Oops, something went wrong.