Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for casPointer (0.3 sec)

  1. src/runtime/atomic_pointer.go

    // atomic_casPointer is the implementation of runtime/internal/UnsafePointer.CompareAndSwap
    // (like CompareAndSwapNoWB but with the write barrier).
    //
    //go:nosplit
    //go:linkname atomic_casPointer internal/runtime/atomic.casPointer
    func atomic_casPointer(ptr *unsafe.Pointer, old, new unsafe.Pointer) bool {
    	if writeBarrier.enabled {
    		atomicwb(ptr, new)
    	}
    	if goexperiment.CgoCheck2 {
    		cgoCheckPtrWrite(ptr, new)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 16:25:21 UTC 2024
    - 4K bytes
    - Viewed (0)
  2. src/internal/runtime/atomic/types.go

    // and if they're equal, swaps u's value with new.
    // It reports whether the swap ran.
    func (u *UnsafePointer) CompareAndSwap(old, new unsafe.Pointer) bool {
    	return casPointer(&u.value, old, new)
    }
    
    func casPointer(ptr *unsafe.Pointer, old, new unsafe.Pointer) bool
    
    // Pointer is an atomic pointer of type *T.
    type Pointer[T any] struct {
    	u UnsafePointer
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 14.2K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/types2/compilersupport.go

    // license that can be found in the LICENSE file.
    
    // Helper functions exported for the compiler.
    // Do not use internally.
    
    package types2
    
    // If t is a pointer, AsPointer returns that type, otherwise it returns nil.
    func AsPointer(t Type) *Pointer {
    	u, _ := t.Underlying().(*Pointer)
    	return u
    }
    
    // If t is a signature, AsSignature returns that type, otherwise it returns nil.
    func AsSignature(t Type) *Signature {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 09 22:58:35 UTC 2022
    - 1K bytes
    - Viewed (0)
  4. src/cmd/cgo/gcc.go

    		return false
    	}
    
    	return p.hasPointer(f, t, true)
    }
    
    // hasPointer is used by needsPointerCheck. If top is true it returns
    // whether t is or contains a pointer that might point to a pointer.
    // If top is false it reports whether t is or contains a pointer.
    // f may be nil.
    func (p *Package) hasPointer(f *File, t ast.Expr, top bool) bool {
    	switch t := t.(type) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 15:50:06 UTC 2024
    - 97K bytes
    - Viewed (0)
  5. src/cmd/cgo/out.go

    		if gccResult != "void" {
    			// Verify that any results don't contain any
    			// Go pointers.
    			forFieldList(fntype.Results,
    				func(i int, aname string, atype ast.Expr) {
    					if !p.hasPointer(nil, atype, false) {
    						return
    					}
    					fmt.Fprintf(fgo2, "\t_cgoCheckResult(a.r%d)\n", i)
    				})
    		}
    		fmt.Fprint(fgo2, "}\n")
    	}
    
    	fmt.Fprintf(fgcch, "%s", gccExportHeaderEpilog)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 29 16:41:10 UTC 2024
    - 59.6K bytes
    - Viewed (0)
Back to top