Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for runtime_randn (0.2 sec)

  1. src/sync/pool.go

    	// Prevents false sharing on widespread platforms with
    	// 128 mod (cache line size) = 0 .
    	pad [128 - unsafe.Sizeof(poolLocalInternal{})%128]byte
    }
    
    // from runtime
    //
    //go:linkname runtime_randn runtime.randn
    func runtime_randn(n uint32) uint32
    
    var poolRaceHash [128]uint64
    
    // poolRaceAddr returns an address to use as the synchronization point
    // for race detector logic. We don't use the actual pointer stored in x
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 21:14:51 UTC 2024
    - 9.4K bytes
    - Viewed (0)
  2. src/hash/maphash/maphash_runtime.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    //go:build !purego
    
    package maphash
    
    import (
    	"unsafe"
    )
    
    //go:linkname runtime_rand runtime.rand
    func runtime_rand() uint64
    
    //go:linkname runtime_memhash runtime.memhash
    //go:noescape
    func runtime_memhash(p unsafe.Pointer, seed, s uintptr) uintptr
    
    func rthash(buf []byte, seed uint64) uint64 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 05 20:34:30 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  3. src/os/tempfile.go

    // chance the file doesn't exist yet - keeps the number of tries in
    // TempFile to a minimum.
    //
    //go:linkname runtime_rand runtime.rand
    func runtime_rand() uint64
    
    func nextRandom() string {
    	return itoa.Uitoa(uint(uint32(runtime_rand())))
    }
    
    // CreateTemp creates a new temporary file in the directory dir,
    // opens the file for reading and writing, and returns the resulting file.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 12 18:04:39 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  4. src/net/dnsclient.go

    	"internal/itoa"
    	"slices"
    	_ "unsafe" // for go:linkname
    
    	"golang.org/x/net/dns/dnsmessage"
    )
    
    // provided by runtime
    //
    //go:linkname runtime_rand runtime.rand
    func runtime_rand() uint64
    
    func randInt() int {
    	return int(uint(runtime_rand()) >> 1) // clear sign bit
    }
    
    func randIntn(n int) int {
    	return randInt() % n
    }
    
    // reverseaddr returns the in-addr.arpa. or ip6.arpa. hostname of the IP
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:16:53 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  5. src/math/rand/rand.go

    	}
    
    	return r
    }
    
    //go:linkname runtime_rand runtime.rand
    func runtime_rand() uint64
    
    // runtimeSource is an implementation of Source64 that uses the runtime
    // fastrand functions.
    type runtimeSource struct {
    	// The mutex is used to avoid race conditions in Read.
    	mu sync.Mutex
    }
    
    func (*runtimeSource) Int63() int64 {
    	return int64(runtime_rand() & rngMask)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 22:09:08 UTC 2024
    - 16.9K bytes
    - Viewed (0)
  6. src/math/rand/v2/rand.go

    // convenience functions.
    var globalRand = &Rand{src: runtimeSource{}}
    
    //go:linkname runtime_rand runtime.rand
    func runtime_rand() uint64
    
    // runtimeSource is a Source that uses the runtime fastrand functions.
    type runtimeSource struct{}
    
    func (runtimeSource) Uint64() uint64 {
    	return runtime_rand()
    }
    
    // Int64 returns a non-negative pseudo-random 63-bit integer as an int64
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 02:25:49 UTC 2024
    - 12.8K bytes
    - Viewed (0)
Back to top