mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-23 01:13:23 +00:00
Use CpuId
with validity ensurance rather than u32
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
b400d287fa
commit
3468ec213b
@ -164,7 +164,7 @@ static FUTEX_BUCKETS: Once<FutexBucketVec> = Once::new();
|
||||
/// This number is calculated the same way as Linux's:
|
||||
/// <https://github.com/torvalds/linux/blob/master/kernel/futex/core.c>
|
||||
fn get_bucket_count() -> usize {
|
||||
((1 << 8) * num_cpus()).next_power_of_two() as usize
|
||||
((1 << 8) * num_cpus()).next_power_of_two()
|
||||
}
|
||||
|
||||
fn get_futex_bucket(key: FutexKey) -> (usize, FutexBucketRef) {
|
||||
|
Reference in New Issue
Block a user