Skip to content

Commit

Permalink
hang if runtime.Exit returns
Browse files Browse the repository at this point in the history
  • Loading branch information
abarisani committed Aug 8, 2023
1 parent cccb812 commit 377d4c9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions src/runtime/os_tamago_arm.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,14 +203,14 @@ func usleep_no_g(usec uint32) {
var Exit func()

func exit(code int32) {
print("exit with code ", code, " halting\n")

if Exit != nil {
Exit()
} else {
print("exit with code ", code, " halting\n")
}

for {
// hang forever
}
for {
// hang forever
}
}

Expand Down
10 changes: 5 additions & 5 deletions src/runtime/os_tamago_riscv64.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,14 +176,14 @@ func usleep_no_g(usec uint32) {
var Exit func()

func exit(code int32) {
print("exit with code ", code, " halting\n")

if Exit != nil {
Exit()
} else {
print("exit with code ", code, " halting\n")
}

for {
// hang forever
}
for {
// hang forever
}
}

Expand Down

0 comments on commit 377d4c9

Please sign in to comment.