MCPcopy Create free account
hub / github.com/cinit/TMoe / getKernelArchitecture

Function getKernelArchitecture

app/src/main/cpp/utils/ProcessUtils.cpp:155–170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

153}
154
155int getKernelArchitecture() noexcept {
156 struct utsname uts = {};
157 if (uname(&uts) != 0) {
158 return -errno;
159 }
160 if (strcmp(uts.machine, "x86_64") == 0) {
161 return Architecture::ARCH_X86_64;
162 } else if (strcmp(uts.machine, "x86") == 0) {
163 return Architecture::ARCH_X86;
164 } else if (strcmp(uts.machine, "arm") == 0) {
165 return Architecture::ARCH_ARM;
166 } else if (strcmp(uts.machine, "aarch64") == 0) {
167 return Architecture::ARCH_AARCH64;
168 }
169 return -ENOTSUP;
170}
171
172int getCurrentProcessArchitecture() noexcept {
173#if defined(__aarch64__) || defined(__arm64__) || defined (_M_ARM64)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected