Internal change
PiperOrigin-RevId: 234009849
This commit is contained in:
parent
9b542ce7ef
commit
c314d0cd20
@ -102,7 +102,7 @@ class PosixEnv : public Env {
|
||||
}
|
||||
|
||||
bool GetCurrentThreadName(string* name) override {
|
||||
#ifdef __ANDROID__
|
||||
#if defined(__ANDROID__) || defined(__EMSCRIPTEN__)
|
||||
return false;
|
||||
#else
|
||||
char buf[100];
|
||||
|
||||
@ -82,7 +82,9 @@ int NumTotalCPUs() {
|
||||
}
|
||||
|
||||
int GetCurrentCPU() {
|
||||
#if defined(__linux__) && !defined(__ANDROID__)
|
||||
#if defined(__EMSCRIPTEN__)
|
||||
return sched_getcpu();
|
||||
#elif defined(__linux__) && !defined(__ANDROID__)
|
||||
return sched_getcpu();
|
||||
// Attempt to use cpuid on all other platforms. If that fails, perform a
|
||||
// syscall.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user