github.com/tinygo-org/tinygo@v0.31.3-0.20240404173401-90b0bf646c27/src/runtime/runtime_cortexm_abort.go (about)

     1  //go:build cortexm && !nxp && !qemu
     2  
     3  package runtime
     4  
     5  import (
     6  	"device/arm"
     7  )
     8  
     9  func exit(code int) {
    10  	abort()
    11  }
    12  
    13  func abort() {
    14  	// lock up forever
    15  	for {
    16  		arm.Asm("wfi")
    17  	}
    18  }