Call getg() in mcall()

92 views
Skip to first unread message

wang jun

unread,
Aug 18, 2022, 8:52:54 AM8/18/22
to golang-nuts
If i call getg() in mcall(), what kind of gorouting would I have? g0 or normal g?

Ian Lance Taylor

unread,
Aug 18, 2022, 11:14:52 PM8/18/22
to wang jun, golang-nuts
On Thu, Aug 18, 2022 at 5:52 AM wang jun <wangjun...@gmail.com> wrote:
>
> If i call getg() in mcall(), what kind of gorouting would I have? g0 or normal g?

Do you mean: if you use mcall to call a function, and that function
calls getg, what does getg return? It returns a g0.

Ian
Reply all
Reply to author
Forward
0 new messages