this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Provide sysctl(hw.cpu64bit_capable) (#304)

+11 -1
+11 -1
src/kernel/emulation/linux/misc/sysctl_hw.c
··· 17 17 _HW_LOGICAL_CPU_MAX, 18 18 _HW_CPUTYPE, 19 19 _HW_CPUSUBTYPE, 20 - _HW_CPUTHREADTYPE 20 + _HW_CPUTHREADTYPE, 21 + _HW_64BITCAPABLE, 21 22 }; 22 23 23 24 static sysctl_handler(handle_availcpu); ··· 30 31 static sysctl_handler(handle_cputype); 31 32 static sysctl_handler(handle_cpusubtype); 32 33 static sysctl_handler(handle_cputhreadtype); 34 + static sysctl_handler(handle_cpu64bitcapable); 33 35 static sysctl_handler(handle_machine); 34 36 35 37 const struct known_sysctl sysctls_hw[] = { ··· 44 46 { .oid = _HW_CPUTYPE, .type = CTLTYPE_INT, .exttype = "", .name = "cputype", .handler = handle_cputype }, 45 47 { .oid = _HW_CPUSUBTYPE, .type = CTLTYPE_INT, .exttype = "", .name = "cpusubtype", .handler = handle_cpusubtype }, 46 48 { .oid = _HW_CPUTHREADTYPE, .type = CTLTYPE_INT, .exttype = "", .name = "cputhreadtype", .handler = handle_cputhreadtype }, 49 + { .oid = _HW_64BITCAPABLE, .type = CTLTYPE_INT, .exttype = "", .name = "cpu64bit_capable", .handler = handle_cpu64bitcapable }, 47 50 { .oid = HW_MACHINE, .type = CTLTYPE_STRING, .exttype = "S", .name = "machine", .handler = handle_machine }, 48 51 { .oid = -1 } 49 52 }; ··· 132 135 { 133 136 sysctl_handle_size(sizeof(int)); 134 137 *((int*) old) = gethostinfo()->cpu_threadtype; 138 + return 0; 139 + } 140 + 141 + sysctl_handler(handle_cpu64bitcapable) 142 + { 143 + sysctl_handle_size(sizeof(int)); 144 + *((int*) old) = 1; // Darling only supports 64-bit CPUs 135 145 return 0; 136 146 } 137 147