Skip to content

Commit 0ed02cc

Browse files
committed
Remove get_num_cpus which is no longer used
1 parent 5e40e4c commit 0ed02cc

2 files changed

Lines changed: 0 additions & 17 deletions

File tree

src/util.cc

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1916,15 +1916,6 @@ vector<string> current_env() {
19161916
return env;
19171917
}
19181918

1919-
int get_num_cpus() {
1920-
cpu_set_t affinity_mask;
1921-
int ret = sched_getaffinity(0, sizeof(affinity_mask), &affinity_mask);
1922-
if (ret < 0) {
1923-
FATAL() << "sched_getaffinity failed";
1924-
}
1925-
return CPU_COUNT(&affinity_mask);
1926-
}
1927-
19281919
const uint8_t rdtsc_insn[2] = { 0x0f, 0x31 };
19291920

19301921
static const uint8_t rdtscp_insn[] = { 0x0f, 0x01, 0xf9 };

src/util.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -479,14 +479,6 @@ void good_random(void* out, size_t out_len);
479479

480480
std::vector<std::string> current_env();
481481

482-
/**
483-
* Returns the number of CPUs online. This is useful for sizing a thread
484-
* pool.
485-
* We might see CPUs with an index >= this value, so this is not useful
486-
* for comparing with CPU indices.
487-
*/
488-
int get_num_cpus();
489-
490482
enum class SpecialInstOpcode {
491483
NONE,
492484
ARM_MRS_CNTFRQ_EL0,

0 commit comments

Comments
 (0)