FAQ
https://codereview.appspot.com/9843046/diff/8001/src/pkg/runtime/proc.c
File src/pkg/runtime/proc.c (right):

https://codereview.appspot.com/9843046/diff/8001/src/pkg/runtime/proc.c#newcode2071
src/pkg/runtime/proc.c:2071: preemptall(void)
Please add a comment before these new functions explaining what they do
and explaining what locks need to be held before calling them.

https://codereview.appspot.com/9843046/diff/8001/src/pkg/runtime/proc.c#newcode2096
src/pkg/runtime/proc.c:2096: gp->stackguard = StackPreempt;
If I understand this correctly, this g might actually be running in
parallel. So this assignment to gp->stackguard might be overwritten
before it takes effect. If I'm right I think there needs to be a
comment explaining that.

https://codereview.appspot.com/9843046/

--

---
You received this message because you are subscribed to the Google Groups "golang-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Dvyukov at Jun 1, 2013 at 7:36 pm
    On 2013/06/01 00:24:46, iant wrote:

    https://codereview.appspot.com/9843046/diff/8001/src/pkg/runtime/proc.c
    File src/pkg/runtime/proc.c (right):

    https://codereview.appspot.com/9843046/diff/8001/src/pkg/runtime/proc.c#newcode2071
    src/pkg/runtime/proc.c:2071: preemptall(void)
    Please add a comment before these new functions explaining what they do and
    explaining what locks need to be held before calling them.

    https://codereview.appspot.com/9843046/diff/8001/src/pkg/runtime/proc.c#newcode2096
    src/pkg/runtime/proc.c:2096: gp->stackguard = StackPreempt;
    If I understand this correctly, this g might actually be running in parallel.
    So this assignment to gp->stackguard might be overwritten before it takes
    effect. If I'm right I think there needs to be a comment explaining
    that.

    Added the comments.
    The semantics are formally very weak, by no locks needs to be held.
    Thanks!

    https://codereview.appspot.com/9843046/

    --

    ---
    You received this message because you are subscribed to the Google Groups "golang-dev" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-dev @
categoriesgo
postedJun 1, '13 at 12:24a
activeJun 1, '13 at 7:36p
posts2
users2
websitegolang.org

2 users in discussion

Dvyukov: 1 post Iant: 1 post

People

Translate

site design / logo © 2022 Grokbase