Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 39 for sysconf (0.11 sec)

  1. src/runtime/os_only_solaris.go

    // license that can be found in the LICENSE file.
    
    // Solaris code that doesn't also apply to illumos.
    
    //go:build !illumos
    
    package runtime
    
    func getncpu() int32 {
    	n := int32(sysconf(__SC_NPROCESSORS_ONLN))
    	if n < 1 {
    		return 1
    	}
    
    	return n
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 28 18:17:57 UTC 2021
    - 357 bytes
    - Viewed (0)
  2. src/runtime/race/race_darwin_amd64.go

    //go:cgo_import_dynamic sched_yield sched_yield ""
    //go:cgo_import_dynamic setrlimit setrlimit ""
    //go:cgo_import_dynamic sigaction sigaction ""
    //go:cgo_import_dynamic stat$INODE64 stat$INODE64 ""
    //go:cgo_import_dynamic sysconf sysconf ""
    //go:cgo_import_dynamic sysctl sysctl ""
    //go:cgo_import_dynamic sysctlbyname sysctlbyname ""
    //go:cgo_import_dynamic task_info task_info ""
    //go:cgo_import_dynamic tcgetattr tcgetattr ""
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 16 19:29:22 UTC 2023
    - 5.6K bytes
    - Viewed (0)
  3. src/runtime/race/race_darwin_arm64.go

    //go:cgo_import_dynamic sched_yield sched_yield ""
    //go:cgo_import_dynamic setrlimit setrlimit ""
    //go:cgo_import_dynamic sigaction sigaction ""
    //go:cgo_import_dynamic stat stat ""
    //go:cgo_import_dynamic sysconf sysconf ""
    //go:cgo_import_dynamic sysctl sysctl ""
    //go:cgo_import_dynamic sysctlbyname sysctlbyname ""
    //go:cgo_import_dynamic task_info task_info ""
    //go:cgo_import_dynamic tcgetattr tcgetattr ""
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 16 19:29:22 UTC 2023
    - 5.6K bytes
    - Viewed (0)
  4. src/internal/syscall/unix/user_darwin.go

    		uintptr(unsafe.Pointer(buf)),
    		size,
    		uintptr(unsafe.Pointer(result)),
    		0)
    	return syscall.Errno(errno)
    }
    
    //go:cgo_import_dynamic libc_sysconf sysconf "/usr/lib/libSystem.B.dylib"
    func libc_sysconf_trampoline()
    
    func Sysconf(key int32) int64 {
    	val, _, errno := syscall_syscall6X(abi.FuncPCABI0(libc_sysconf_trampoline),
    		uintptr(key), 0, 0, 0, 0, 0)
    	if errno != 0 {
    		return -1
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Dec 07 16:09:09 UTC 2022
    - 3.4K bytes
    - Viewed (0)
  5. src/os/exec_unix_test.go

    	if runtime.GOOS == "solaris" || runtime.GOOS == "illumos" {
    		// Solaris/Illumos have a lower limit, above which wait returns
    		// EINVAL (see waitid in usr/src/uts/common/os/exit.c in
    		// illumos). This is configurable via sysconf(_SC_MAXPID), but
    		// we'll just take the default.
    		pid = 30000-1
    	}
    
    	p, err := FindProcess(pid)
    	if err != nil {
    		t.Fatalf("FindProcess(math.MaxInt32) got err %v, want nil", err)
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 11 18:08:44 UTC 2024
    - 2K bytes
    - Viewed (0)
  6. src/os/user/cgo_lookup_syscall.go

    	return grp, result != nil, errno
    }
    
    const (
    	_C__SC_GETPW_R_SIZE_MAX = unix.SC_GETPW_R_SIZE_MAX
    	_C__SC_GETGR_R_SIZE_MAX = unix.SC_GETGR_R_SIZE_MAX
    )
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 11 04:31:34 UTC 2022
    - 2.2K bytes
    - Viewed (0)
  7. src/runtime/os_aix.go

    		throw("sem_post")
    	}
    }
    
    func osinit() {
    	// Call miniterrno so that we can safely make system calls
    	// before calling minit on m0.
    	miniterrno()
    
    	ncpu = int32(sysconf(__SC_NPROCESSORS_ONLN))
    	physPageSize = sysconf(__SC_PAGE_SIZE)
    }
    
    // newosproc0 is a version of newosproc that can be called before the runtime
    // is initialized.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  8. src/internal/poll/writev.go

    	}
    	defer fd.writeUnlock()
    	if err := fd.pd.prepareWrite(fd.isFile); err != nil {
    		return 0, err
    	}
    
    	var iovecs []syscall.Iovec
    	if fd.iovecs != nil {
    		iovecs = *fd.iovecs
    	}
    	// TODO: read from sysconf(_SC_IOV_MAX)? The Linux default is
    	// 1024 and this seems conservative enough for now. Darwin's
    	// UIO_MAXIOV also seems to be 1024.
    	maxVec := 1024
    	if runtime.GOOS == "aix" || runtime.GOOS == "solaris" {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 27 18:23:49 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  9. src/os/user/cgo_lookup_cgo.go

    	return grp, f != 0, syscall.Errno(e)
    }
    
    const (
    	_C__SC_GETPW_R_SIZE_MAX = C._SC_GETPW_R_SIZE_MAX
    	_C__SC_GETGR_R_SIZE_MAX = C._SC_GETGR_R_SIZE_MAX
    )
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Dec 16 17:45:51 UTC 2022
    - 3.4K bytes
    - Viewed (0)
  10. src/runtime/os_illumos.go

    		}
    
    		// Swap the blocks around so that we can fetch the next value
    		t := rblk
    		rblk = rblkprev
    		rblkprev = t
    		flag = _RCTL_NEXT
    	}
    
    	return capval
    }
    
    func getncpu() int32 {
    	n := int32(sysconf(__SC_NPROCESSORS_ONLN))
    	if n < 1 {
    		return 1
    	}
    
    	if cents := int32(getcpucap()); cents > 0 {
    		// Convert from a percentage of CPUs to a number of CPUs,
    		// rounding up to make use of a fractional CPU
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 28 18:06:12 UTC 2019
    - 3.9K bytes
    - Viewed (0)
Back to top