]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: fix comments that mention g status values
authorAlex Brainman <alex.brainman@gmail.com>
Wed, 6 May 2015 05:22:34 +0000 (15:22 +1000)
committerAlex Brainman <alex.brainman@gmail.com>
Thu, 7 May 2015 00:00:38 +0000 (00:00 +0000)
Makes searching in source code easier.

Change-Id: Ie2e85934d23920ac0bc01d28168bcfbbdc465580
Reviewed-on: https://go-review.googlesource.com/9774
Reviewed-by: Daniel Morsing <daniel.morsing@gmail.com>
Reviewed-by: Minux Ma <minux@golang.org>
src/runtime/runtime2.go

index 5e73214283a0349e62570b92dcc00b2505a20e17..ac539b9a9dc486d88a9cac784099bff777e31e5d 100644 (file)
@@ -29,7 +29,7 @@ const (
        // _Gscanidle =     _Gscan + _Gidle,      // Not used. Gidle only used with newly malloced gs
        _Gscanrunnable = _Gscan + _Grunnable //  0x1001 When scanning complets make Grunnable (it is already on run queue)
        _Gscanrunning  = _Gscan + _Grunning  //  0x1002 Used to tell preemption newstack routine to scan preempted stack.
-       _Gscansyscall  = _Gscan + _Gsyscall  //  0x1003 When scanning completes make is Gsyscall
+       _Gscansyscall  = _Gscan + _Gsyscall  //  0x1003 When scanning completes make it Gsyscall
        _Gscanwaiting  = _Gscan + _Gwaiting  //  0x1004 When scanning completes make it Gwaiting
        // _Gscanmoribund_unused,               //  not possible
        // _Gscandead,                          //  not possible
@@ -217,13 +217,13 @@ type g struct {
        _panic       *_panic // innermost panic - offset known to liblink
        _defer       *_defer // innermost defer
        sched        gobuf
-       syscallsp    uintptr        // if status==gsyscall, syscallsp = sched.sp to use during gc
-       syscallpc    uintptr        // if status==gsyscall, syscallpc = sched.pc to use during gc
+       syscallsp    uintptr        // if status==Gsyscall, syscallsp = sched.sp to use during gc
+       syscallpc    uintptr        // if status==Gsyscall, syscallpc = sched.pc to use during gc
        param        unsafe.Pointer // passed parameter on wakeup
        atomicstatus uint32
        goid         int64
        waitsince    int64  // approx time when the g become blocked
-       waitreason   string // if status==gwaiting
+       waitreason   string // if status==Gwaiting
        schedlink    guintptr
        preempt      bool // preemption signal, duplicates stackguard0 = stackpreempt
        paniconfault bool // panic (instead of crash) on unexpected fault address