Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for MakeChan (0.26 sec)

  1. test/makechan.go

    cui fliter <******@****.***> 1704176745 +0800
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:29:45 UTC 2024
    - 1K bytes
    - Viewed (0)
  2. test/chancap.go

    	}
    
    	n := -1
    	shouldPanic("makechan: size out of range", func() { _ = make(T, n) })
    	shouldPanic("makechan: size out of range", func() { _ = make(T, int64(n)) })
    	if ptrSize == 8 {
    		// Test mem > maxAlloc
    		var n2 int64 = 1 << 59
    		shouldPanic("makechan: size out of range", func() { _ = make(T, int(n2)) })
    		// Test elem.size*cap overflow
    		n2 = 1<<63 - 1
    		shouldPanic("makechan: size out of range", func() { _ = make(T, int(n2)) })
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 26 14:06:28 UTC 2018
    - 1.6K bytes
    - Viewed (0)
  3. src/runtime/race/testdata/regression_test.go

    	x := s.pop()
    	_ = x
    }
    
    type RpcChan struct {
    	c chan bool
    }
    
    var makeChanCalls int
    
    //go:noinline
    func makeChan() *RpcChan {
    	makeChanCalls++
    	c := &RpcChan{make(chan bool, 1)}
    	c.c <- true
    	return c
    }
    
    func call() bool {
    	x := <-makeChan().c
    	return x
    }
    
    func TestNoRaceRpcChan(t *testing.T) {
    	makeChanCalls = 0
    	_ = call()
    	if makeChanCalls != 1 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 03 02:01:34 UTC 2015
    - 2.7K bytes
    - Viewed (0)
  4. src/runtime/chan.go

    	first *sudog
    	last  *sudog
    }
    
    //go:linkname reflect_makechan reflect.makechan
    func reflect_makechan(t *chantype, size int) *hchan {
    	return makechan(t, size)
    }
    
    func makechan64(t *chantype, size int64) *hchan {
    	if int64(int(size)) != size {
    		panic(plainError("makechan: size out of range"))
    	}
    
    	return makechan(t, int(size))
    }
    
    func makechan(t *chantype, size int) *hchan {
    	elem := t.Elem
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:16:50 UTC 2024
    - 25.9K bytes
    - Viewed (0)
  5. src/cmd/internal/goobj/builtinlist.go

    	{"runtime.mapdelete_fast32", 1},
    	{"runtime.mapdelete_fast64", 1},
    	{"runtime.mapdelete_faststr", 1},
    	{"runtime.mapiternext", 1},
    	{"runtime.mapclear", 1},
    	{"runtime.makechan64", 1},
    	{"runtime.makechan", 1},
    	{"runtime.chanrecv1", 1},
    	{"runtime.chanrecv2", 1},
    	{"runtime.chansend1", 1},
    	{"runtime.closechan", 1},
    	{"runtime.chanlen", 1},
    	{"runtime.chancap", 1},
    	{"runtime.writeBarrier", 0},
    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. src/cmd/compile/internal/typecheck/_builtin/runtime.go

    func mapiternext(hiter *any)
    func mapclear(mapType *byte, hmap map[any]any)
    
    // *byte is really *runtime.Type
    func makechan64(chanType *byte, size int64) (hchan chan any)
    func makechan(chanType *byte, size int) (hchan chan any)
    func chanrecv1(hchan <-chan any, elem *any)
    func chanrecv2(hchan <-chan any, elem *any) bool
    func chansend1(hchan chan<- any, elem *any)
    func closechan(hchan chan<- any)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 21:08:03 UTC 2024
    - 10.6K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/walk/builtin.go

    	// The case of size overflow when converting TUINT or TUINTPTR to TINT
    	// will be handled by the negative range checks in makechan during runtime.
    	if size.Type().IsKind(types.TIDEAL) || size.Type().Size() <= types.Types[types.TUINT].Size() {
    		fnname = "makechan"
    		argtype = types.Types[types.TINT]
    	}
    
    	return mkcall1(chanfn(fnname, 1, n.Type()), n.Type(), init, reflectdata.MakeChanRType(base.Pos, n), typecheck.Conv(size, argtype))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 22:35:22 UTC 2024
    - 31.2K bytes
    - Viewed (0)
  8. src/go/internal/gccgoimporter/testdata/v1reflect.gox

    const Int16 <type 28> = 4 ;
    const Int32 <type 28> = 5 ;
    const Int64 <type 28> = 6 ;
    const Int8 <type 28> = 3 ;
    const Interface <type 28> = 20 ;
    const Invalid <type 28> = 0 ;
    type <type 28>;
    func MakeChan (typ <type 26>, buffer <type -11>) <type 1>;
    func MakeMap (typ <type 26>) <type 1>;
    func MakeSlice (typ <type 26>, len <type -11>, cap <type -11>) <type 1>;
    const Map <type 28> = 21 ;
    type <type 24>;
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 30 21:33:51 UTC 2021
    - 10.3K bytes
    - Viewed (0)
  9. src/reflect/value.go

    }
    
    // MakeChan creates a new channel with the specified type and buffer size.
    func MakeChan(typ Type, buffer int) Value {
    	if typ.Kind() != Chan {
    		panic("reflect.MakeChan of non-chan type")
    	}
    	if buffer < 0 {
    		panic("reflect.MakeChan: negative buffer size")
    	}
    	if typ.ChanDir() != BothDir {
    		panic("reflect.MakeChan: unidirectional channel type")
    	}
    	t := typ.common()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:17:41 UTC 2024
    - 119.9K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/typecheck/builtin.go

    	{"mapdelete_fast32", funcTag, 92},
    	{"mapdelete_fast64", funcTag, 93},
    	{"mapdelete_faststr", funcTag, 94},
    	{"mapiternext", funcTag, 95},
    	{"mapclear", funcTag, 96},
    	{"makechan64", funcTag, 98},
    	{"makechan", funcTag, 99},
    	{"chanrecv1", funcTag, 101},
    	{"chanrecv2", funcTag, 102},
    	{"chansend1", funcTag, 104},
    	{"closechan", funcTag, 105},
    	{"chanlen", funcTag, 106},
    	{"chancap", funcTag, 106},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 21:08:03 UTC 2024
    - 16.2K bytes
    - Viewed (0)
Back to top