Skip to content

Commit

Permalink
Implemented futex and updated WaitQueue to support it
Browse files Browse the repository at this point in the history
1. Implemented futex in modules/ruxfutex.

2. Updated `WaitQueue` in modules/ruxtask to support more operations.

3. Added a new script `scripts/debug/rust-gdb.sh` to help debugging.

4. Added a new make rule `debug_no_attach` to make debugging in external
gdb environment (like VSCode) easier.
  • Loading branch information
Sssssaltyfish committed Mar 12, 2024
1 parent e95f63b commit c42215b
Show file tree
Hide file tree
Showing 19 changed files with 990 additions and 226 deletions.
116 changes: 101 additions & 15 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ members = [
"modules/ruxhal",
"modules/ruxruntime",
"modules/ruxtask",
"modules/ruxfutex",

"api/ruxfeat",
"api/arceos_api",
Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,9 @@ debug: build
-ex 'continue' \
-ex 'disp /16i $$pc'

debug_no_attach: build
$(call run_qemu_debug)

clippy:
ifeq ($(origin ARCH), command line)
$(call cargo_clippy,--target $(TARGET))
Expand Down Expand Up @@ -245,4 +248,4 @@ clean_musl:
rm -rf ulib/ruxmusl/build_*
rm -rf ulib/ruxmusl/install

.PHONY: all build disasm run justrun debug clippy fmt fmt_c test test_no_fail_fast clean clean_c clean_musl doc disk_image
.PHONY: all build disasm run justrun debug clippy fmt fmt_c test test_no_fail_fast clean clean_c clean_musl doc disk_image debug_no_attach
7 changes: 5 additions & 2 deletions api/ruxos_posix_api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ default = []

smp = ["ruxfeat/smp"]
alloc = ["dep:axalloc", "ruxfeat/alloc"]
multitask = ["ruxfeat/multitask", "ruxtask/multitask"]
multitask = ["ruxfeat/multitask", "ruxtask/multitask", "dep:ruxfutex"]
fd = ["alloc"]
fs = ["dep:ruxfs", "ruxfeat/fs", "fd"]
net = ["dep:axnet", "ruxfeat/net", "fd"]
Expand All @@ -41,6 +41,7 @@ ruxconfig = { path = "../../modules/ruxconfig" }
axlog = { path = "../../modules/axlog" }
ruxhal = { path = "../../modules/ruxhal" }
axsync = { path = "../../modules/axsync" }
ruxfutex = { path = "../../modules/ruxfutex", optional = true }
axalloc = { path = "../../modules/axalloc", optional = true }
ruxtask = { path = "../../modules/ruxtask", optional = true }
ruxfs = { path = "../../modules/ruxfs", optional = true }
Expand All @@ -55,5 +56,7 @@ spin = { version = "0.9" }
lazy_static = { version = "1.4", features = ["spin_no_std"] }
flatten_objects = { path = "../../crates/flatten_objects" }

bitflags = "2.2"

[build-dependencies]
bindgen ={ version = "0.66" }
bindgen = { version = "0.66" }
Loading

0 comments on commit c42215b

Please sign in to comment.