Files
Reims-Go/internal/host/host_other.go
T

59 lines
1.8 KiB
Go

//go:build !windows
package host
import (
"fmt"
"runtime"
)
// Inspect returns basic host facts on non-Windows dev machines (e.g., macOS).
func Inspect(dataRoot string) Report {
displays := probeDisplays()
primary := PrimaryDisplayOf(displays)
presets, rec := RecommendDisplayPresets(primary)
return Report{
OS: runtime.GOOS,
Arch: runtime.GOARCH,
LogicalCPUs: runtime.NumCPU(),
CPUTopology: DefaultCPUTopology(runtime.NumCPU()),
DataRoot: dataRoot,
Timezone: DetectHostTimezone(),
DeepBackingChains: InspectVMDiskChains(dataRoot),
WHPX: WHPXUnsupported,
Displays: displays,
PrimaryDisplay: primary,
RecommendedResolution: rec,
DisplayPresets: presets,
ProcessorScheduling: probeProcessorScheduling(),
Audio: ProbeAudio(),
}
}
func ConfigureVulkanDrivers() {}
// ProbeVulkanGPUs returns no adapters on hosts without Windows Vulkan probing.
func ProbeVulkanGPUs() []GPUInfo {
return nil
}
func PinProcessToPCores(pid uint32, mask uint64) error {
return SetProcessAffinityMask(pid, mask)
}
func SetProcessAffinityMask(pid uint32, mask uint64) error {
return fmt.Errorf("process CPU affinity is only supported on Windows (current OS: %s)", runtime.GOOS)
}
func GetProcessAffinityMask(pid uint32) (uint64, uint64, error) {
return 0, 0, fmt.Errorf("process CPU affinity is only supported on Windows (current OS: %s)", runtime.GOOS)
}
func DisableProcessPowerThrottling(pid uint32) error {
return fmt.Errorf("process power throttling control is only supported on Windows (current OS: %s)", runtime.GOOS)
}
func EnableWHPXElevated() error {
return fmt.Errorf("WHPX elevation is only supported on Windows (current OS: %s)", runtime.GOOS)
}