Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 930 for sloc (0.17 sec)

  1. src/log/slog/example_logvaluer_group_test.go

    package slog_test
    
    import "log/slog"
    
    type Name struct {
    	First, Last string
    }
    
    // LogValue implements slog.LogValuer.
    // It returns a group containing the fields of
    // the Name, so that they appear together in the log output.
    func (n Name) LogValue() slog.Value {
    	return slog.GroupValue(
    		slog.String("first", n.First),
    		slog.String("last", n.Last))
    }
    
    func ExampleLogValuer_group() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 21 20:55:33 UTC 2023
    - 825 bytes
    - Viewed (0)
  2. src/sync/poolqueue.go

    		// reading the value to take back ownership of this
    		// slot.
    		head--
    		ptrs2 := d.pack(head, tail)
    		if d.headTail.CompareAndSwap(ptrs, ptrs2) {
    			// We successfully took back slot.
    			slot = &d.vals[head&uint32(len(d.vals)-1)]
    			break
    		}
    	}
    
    	val := *(*any)(unsafe.Pointer(slot))
    	if val == dequeueNil(nil) {
    		val = nil
    	}
    	// Zero the slot. Unlike popTail, this isn't racing with
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 18:12:29 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  3. test/fixedbugs/issue19078.go

    	u += 1<<13 - 1                  // add almost a page
    
    	for i := 0; i < 1000000; i++ {
    		_ = identity(u)         // installs u at return slot
    		_ = liveReturnSlot(nil) // incorrectly marks return slot as live
    	}
    }
    
    //go:noinline
    func liveReturnSlot(x *int) *int {
    	defer func() {}() // causes return slot to be marked live
    	sink = &x         // causes x to be moved to the heap, triggering allocation
    	return x
    }
    
    //go:noinline
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 13 19:39:15 UTC 2017
    - 1.2K bytes
    - Viewed (0)
  4. src/internal/bytealg/index_amd64.go

    // before switching over to Index.
    // n is the number of bytes processed so far.
    // See the bytes.Index implementation for details.
    func Cutover(n int) int {
    	// 1 error per 8 characters, plus a few slop to start.
    	return (n + 16) / 8
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Mar 04 19:49:44 UTC 2018
    - 617 bytes
    - Viewed (0)
  5. src/internal/bytealg/index_ppc64x.go

    // before switching over to Index.
    // n is the number of bytes processed so far.
    // See the bytes.Index implementation for details.
    func Cutover(n int) int {
    	// 1 error per 8 characters, plus a few slop to start.
    	return (n + 16) / 8
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 09 05:34:46 UTC 2023
    - 637 bytes
    - Viewed (0)
  6. src/runtime/atomic_pointer.go

    // Do not remove or change the type signature.
    // See go.dev/issue/67401.
    //
    //go:linkname atomicwb
    //go:nosplit
    func atomicwb(ptr *unsafe.Pointer, new unsafe.Pointer) {
    	slot := (*uintptr)(unsafe.Pointer(ptr))
    	buf := getg().m.p.ptr().wbBuf.get2()
    	buf[0] = *slot
    	buf[1] = uintptr(new)
    }
    
    // atomicstorep performs *ptr = new atomically and invokes a write barrier.
    //
    //go:nosplit
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 16:25:21 UTC 2024
    - 4K bytes
    - Viewed (0)
  7. src/cmd/cgo/internal/testsanitizers/testdata/tsan3.go

    // Copyright 2016 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package main
    
    // The stubs for the C functions read and write the same slot on the
    // g0 stack when copying arguments in and out.
    
    /*
    #cgo CFLAGS: -fsanitize=thread
    #cgo LDFLAGS: -fsanitize=thread
    
    int Func1() {
    	return 0;
    }
    
    void Func2(int x) {
    	(void)x;
    }
    */
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 662 bytes
    - Viewed (0)
  8. test/codegen/zerosize.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // Make sure a pointer variable and a zero-sized variable
    // aren't allocated to the same stack slot.
    // See issue 24993.
    
    package codegen
    
    func zeroSize() {
    	c := make(chan struct{})
    	// amd64:`MOVQ\t\$0, command-line-arguments\.s\+56\(SP\)`
    	var s *int
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 16 18:19:47 UTC 2022
    - 650 bytes
    - Viewed (0)
  9. src/runtime/stubs_386.go

    func uint32tofloat64(a uint32) float64
    
    // stackcheck checks that SP is in range [g->stack.lo, g->stack.hi).
    func stackcheck()
    
    // Called from assembly only; declared for go vet.
    func setldt(slot uintptr, base unsafe.Pointer, size uintptr)
    func emptyfunc()
    
    //go:noescape
    func asmcgocall_no_g(fn, arg unsafe.Pointer)
    
    // getfp returns the frame pointer register of its caller or 0 if not implemented.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 22 10:04:13 UTC 2023
    - 708 bytes
    - Viewed (0)
  10. src/cmd/compile/internal/ssa/writebarrier_test.go

    	// See issue #19067.
    	c := testConfig(t)
    	ptrType := c.config.Types.BytePtr
    	fun := c.Fun("entry",
    		Bloc("entry",
    			Valu("start", OpInitMem, types.TypeMem, 0, nil),
    			Valu("sb", OpSB, c.config.Types.Uintptr, 0, nil),
    			Valu("sp", OpSP, c.config.Types.Uintptr, 0, nil),
    			Goto("loop")),
    		Bloc("loop",
    			Valu("phi", OpPhi, types.TypeMem, 0, nil, "start", "wb"),
    			Valu("v", OpConstNil, ptrType, 0, nil),
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 24 15:51:15 UTC 2018
    - 1.7K bytes
    - Viewed (0)
Back to top