Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 2,960 for selectgo (0.41 sec)

  1. src/runtime/select.go

    // nil.
    //
    // selectgo returns the index of the chosen scase, which matches the
    // ordinal position of its respective select{recv,send,default} call.
    // Also, if the chosen scase was a receive operation, it reports whether
    // a value was received.
    func selectgo(cas0 *scase, order0 *uint16, pc0 *uintptr, nsends, nrecvs int, block bool) (int, bool) {
    	if debugSelect {
    		print("select: cas0=", cas0, "\n")
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 13 21:36:04 UTC 2024
    - 15K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/walk/select.go

    	// optimization: zero-case select
    	if ncas == 0 {
    		return []ir.Node{mkcallstmt("block")}
    	}
    
    	// optimization: one-case select: single op.
    	if ncas == 1 {
    		cas := cases[0]
    		ir.SetPos(cas)
    		l := cas.Init()
    		if cas.Comm != nil { // not default:
    			n := cas.Comm
    			l = append(l, ir.TakeInit(n)...)
    			switch n.Op() {
    			default:
    				base.Fatalf("select %v", n.Op())
    
    			case ir.OSEND:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 22 01:53:41 UTC 2023
    - 7.8K bytes
    - Viewed (0)
  3. src/runtime/race/testdata/select_test.go

    	c1 := make(chan bool)
    
    	go func() {
    		x = 1
    		// At least two channels are needed because
    		// otherwise the compiler optimizes select out.
    		// See comment in runtime/select.go:^func selectgo.
    		select {
    		case c <- true:
    		case c1 <- true:
    		}
    		compl <- true
    	}()
    	select {
    	case <-c:
    	case c1 <- true:
    	}
    	x = 2
    	<-compl
    }
    
    func TestNoRaceSelect2(t *testing.T) {
    	var x int
    	_ = x
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 01 05:25:54 UTC 2020
    - 4.1K bytes
    - Viewed (0)
  4. test/live.go

    func f10() string {
    	panic(1)
    }
    
    // liveness formerly confused by select, thinking runtime.selectgo
    // can return to next instruction; it always jumps elsewhere.
    // note that you have to use at least two cases in the select
    // to get a true select; smaller selects compile to optimized helper functions.
    
    var c chan *int
    var b bool
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 05 20:34:30 UTC 2023
    - 18K bytes
    - Viewed (0)
  5. src/cmd/internal/goobj/builtinlist.go

    	{"runtime.typedmemmove", 1},
    	{"runtime.typedmemclr", 1},
    	{"runtime.typedslicecopy", 1},
    	{"runtime.selectnbsend", 1},
    	{"runtime.selectnbrecv", 1},
    	{"runtime.selectsetpc", 1},
    	{"runtime.selectgo", 1},
    	{"runtime.block", 1},
    	{"runtime.makeslice", 1},
    	{"runtime.makeslice64", 1},
    	{"runtime.makeslicecopy", 1},
    	{"runtime.growslice", 1},
    	{"runtime.unsafeslicecheckptr", 1},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 21:08:03 UTC 2024
    - 7.4K bytes
    - Viewed (0)
  6. test/live_regabi.go

    func f10() string {
    	panic(1)
    }
    
    // liveness formerly confused by select, thinking runtime.selectgo
    // can return to next instruction; it always jumps elsewhere.
    // note that you have to use at least two cases in the select
    // to get a true select; smaller selects compile to optimized helper functions.
    
    var c chan *int
    var b bool
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 05 20:34:30 UTC 2023
    - 18.4K bytes
    - Viewed (0)
  7. src/internal/trace/trace_test.go

    				{"main.main", mainLine + 85},
    			}},
    			{trace.EventStateTransition, "Goroutine Running->Waiting", []frame{
    				{"runtime.selectgo", 0},
    				{"main.main.func6", 0},
    			}},
    			{trace.EventStateTransition, "Goroutine Waiting->Runnable", []frame{
    				{"runtime.selectgo", 0},
    				{"main.main", mainLine + 86},
    			}},
    			{trace.EventStateTransition, "Goroutine Running->Waiting", []frame{
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 18.5K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/typecheck/_builtin/runtime.go

    func selectnbsend(hchan chan<- any, elem *any) bool
    func selectnbrecv(elem *any, hchan <-chan any) (bool, bool)
    
    func selectsetpc(pc *uintptr)
    func selectgo(cas0 *byte, order0 *byte, pc0 *uintptr, nsends int, nrecvs int, block bool) (int, bool)
    func block()
    
    func makeslice(typ *byte, len int, cap int) unsafe.Pointer
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 21:08:03 UTC 2024
    - 10.6K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/typecheck/builtin.go

    	{"typedmemmove", funcTag, 109},
    	{"typedmemclr", funcTag, 110},
    	{"typedslicecopy", funcTag, 111},
    	{"selectnbsend", funcTag, 112},
    	{"selectnbrecv", funcTag, 113},
    	{"selectsetpc", funcTag, 114},
    	{"selectgo", funcTag, 115},
    	{"block", funcTag, 9},
    	{"makeslice", funcTag, 116},
    	{"makeslice64", funcTag, 117},
    	{"makeslicecopy", funcTag, 118},
    	{"growslice", funcTag, 120},
    	{"unsafeslicecheckptr", funcTag, 121},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 21:08:03 UTC 2024
    - 16.2K bytes
    - Viewed (0)
  10. src/runtime/pprof/pprof_test.go

    `},
    		{
    			name: "select recv async",
    			f:    blockSelectRecvAsync,
    			stk: []string{
    				"runtime.selectgo",
    				"runtime/pprof.blockSelectRecvAsync",
    				"runtime/pprof.TestBlockProfile",
    			},
    			re: `
    [0-9]+ [0-9]+ @( 0x[[:xdigit:]]+)+
    #	0x[0-9a-f]+	runtime\.selectgo\+0x[0-9a-f]+	.*runtime/select.go:[0-9]+
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 68.8K bytes
    - Viewed (0)
Back to top