mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-10 22:13:39 +00:00
runtime: check for heap allocations inside interrupts
This is unsafe and should never be done.
This commit is contained in:
committed by
Ron Evans
parent
e066e67baf
commit
f41b6a3b96
@@ -23,3 +23,9 @@ func Disable() (state State) {
|
||||
// calling Disable, this will not re-enable interrupts, allowing for nested
|
||||
// cricital sections.
|
||||
func Restore(state State) {}
|
||||
|
||||
// In returns whether the system is currently in an interrupt.
|
||||
func In() bool {
|
||||
// There are no interrupts, so it can't be in one.
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user