diff options
Diffstat (limited to 'src/pkg/runtime/proc.c')
| -rw-r--r-- | src/pkg/runtime/proc.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/pkg/runtime/proc.c b/src/pkg/runtime/proc.c index 44741a66e8..fffd04b7fb 100644 --- a/src/pkg/runtime/proc.c +++ b/src/pkg/runtime/proc.c @@ -2496,3 +2496,12 @@ runtime·haszeroargs(uintptr pc) pc == (uintptr)_rt0_go; } +// Does f mark the top of a goroutine stack? +bool +runtime·topofstack(Func *f) +{ + return f->entry == (uintptr)runtime·goexit || + f->entry == (uintptr)runtime·mstart || + f->entry == (uintptr)runtime·mcall || + f->entry == (uintptr)_rt0_go; +} |
