Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 316 for offsetsof (0.13 sec)

  1. cmd/os-dirent_namelen_linux.go

    package cmd
    
    import (
    	"bytes"
    	"fmt"
    	"syscall"
    	"unsafe"
    )
    
    func direntNamlen(dirent *syscall.Dirent) (uint64, error) {
    	const fixedHdr = uint16(unsafe.Offsetof(syscall.Dirent{}.Name))
    	nameBuf := (*[unsafe.Sizeof(dirent.Name)]byte)(unsafe.Pointer(&dirent.Name[0]))
    	const nameBufLen = uint16(len(nameBuf))
    	limit := dirent.Reclen - fixedHdr
    	if limit > nameBufLen {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Aug 19 01:35:22 UTC 2021
    - 1.5K bytes
    - Viewed (0)
  2. src/syscall/syscall_netbsd.go

    }
    
    func direntIno(buf []byte) (uint64, bool) {
    	return readInt(buf, unsafe.Offsetof(Dirent{}.Fileno), unsafe.Sizeof(Dirent{}.Fileno))
    }
    
    func direntReclen(buf []byte) (uint64, bool) {
    	return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
    }
    
    func direntNamlen(buf []byte) (uint64, bool) {
    	return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 20 18:12:35 UTC 2023
    - 7.8K bytes
    - Viewed (0)
  3. test/used.go

    	imag(cp)               // ERROR "imag\(cp\) .* not used"
    	complex(1, 2)          // ERROR "complex\(1, 2\) .* not used"
    	unsafe.Alignof(t.X)    // ERROR "unsafe.Alignof\(t.X\) .* not used"
    	unsafe.Offsetof(t.X)   // ERROR "unsafe.Offsetof\(t.X\) .* not used"
    	unsafe.Sizeof(t)       // ERROR "unsafe.Sizeof\(t\) .* not used"
    	_ = int                // ERROR "type int is not an expression|not an expression"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 28 08:39:17 UTC 2020
    - 6K bytes
    - Viewed (0)
  4. test/fixedbugs/issue4909b.go

    	A%d int
    	T%d
    	*T%d
    }
    `
    
    func writeStruct(n int) {
    	fmt.Printf(structTpl, n, n, 2*n, 2*n+1)
    }
    
    func writeDot(ns ...int) {
    	for _, root := range []string{"t", "p"} {
    		fmt.Printf("const _ = unsafe.Offsetof(%s", root)
    		for _, n := range ns {
    			fmt.Printf(".T%d", n)
    		}
    		// Does it involve an indirection?
    		nlast := ns[len(ns)-1]
    		nprev := 1
    		if len(ns) > 1 {
    			nprev = ns[len(ns)-2]
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 19 06:26:35 UTC 2021
    - 1.3K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/types2/builtins.go

    			}
    		} else {
    			x.mode = constant_
    			x.val = constant.MakeInt64(check.conf.alignof(x.typ))
    			// result is constant - no need to record signature
    		}
    		x.typ = Typ[Uintptr]
    
    	case _Offsetof:
    		// unsafe.Offsetof(x T) uintptr, where x must be a selector
    		// (no argument evaluated yet)
    		arg0 := argList[0]
    		selx, _ := syntax.Unparen(arg0).(*syntax.SelectorExpr)
    		if selx == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 27.1K bytes
    - Viewed (0)
  6. src/syscall/syscall_freebsd.go

    }
    
    func direntIno(buf []byte) (uint64, bool) {
    	return readInt(buf, unsafe.Offsetof(Dirent{}.Fileno), unsafe.Sizeof(Dirent{}.Fileno))
    }
    
    func direntReclen(buf []byte) (uint64, bool) {
    	return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
    }
    
    func direntNamlen(buf []byte) (uint64, bool) {
    	return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))
    }
    
    func Pipe(p []int) error {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 20 18:12:35 UTC 2023
    - 8.7K bytes
    - Viewed (0)
  7. src/cmd/vendor/golang.org/x/text/cases/trieval.go

    var trie = newCaseTrie(0)
    
    var sparse = sparseBlocks{
    	values:  sparseValues[:],
    	offsets: sparseOffsets[:],
    }
    
    // Sparse block lookup code.
    
    // valueRange is an entry in a sparse block.
    type valueRange struct {
    	value  uint16
    	lo, hi byte
    }
    
    type sparseBlocks struct {
    	values  []valueRange
    	offsets []uint16
    }
    
    // lookup returns the value from values block n for byte b using binary search.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 24 13:01:26 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  8. src/internal/runtime/atomic/atomic_arm64.go

    // license that can be found in the LICENSE file.
    
    //go:build arm64
    
    package atomic
    
    import (
    	"internal/cpu"
    	"unsafe"
    )
    
    const (
    	offsetARM64HasATOMICS = unsafe.Offsetof(cpu.ARM64.HasATOMICS)
    )
    
    //go:noescape
    func Xadd(ptr *uint32, delta int32) uint32
    
    //go:noescape
    func Xadd64(ptr *uint64, delta int64) uint64
    
    //go:noescape
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  9. src/syscall/syscall_js.go

    	return 1, true
    }
    
    func direntReclen(buf []byte) (uint64, bool) {
    	return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
    }
    
    func direntNamlen(buf []byte) (uint64, bool) {
    	reclen, ok := direntReclen(buf)
    	if !ok {
    		return 0, false
    	}
    	return reclen - uint64(unsafe.Offsetof(Dirent{}.Name)), true
    }
    
    const PathMax = 256
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 21:03:59 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  10. ci/official/containers/linux_arm64/devel.usertools/aarch64_clang.bazelrc

    # Disable clang extension that rejects type definitions within offsetof. 
    # This was added in clang-16 by https://reviews.llvm.org/D133574.
    # Can be removed once upb is updated, since a type definition is used within
    # offset of in the current version of ubp.
    # See https://github.com/protocolbuffers/upb/blob/9effcbcb27f0a665f9f345030188c0b291e32482/upb/upb.c#L183.
    build --copt=-Wno-gnu-offsetof-extensions
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Nov 21 12:25:39 UTC 2023
    - 6.3K bytes
    - Viewed (0)
Back to top