forked from Bananymous/banan-os
Kernel: Add templated get function for Random
This commit is contained in:
parent
30592b27ce
commit
3823de6552
|
@ -11,6 +11,14 @@ namespace Kernel
|
||||||
static void initialize();
|
static void initialize();
|
||||||
static uint32_t get_u32();
|
static uint32_t get_u32();
|
||||||
static uint64_t get_u64();
|
static uint64_t get_u64();
|
||||||
|
template<typename T>
|
||||||
|
static T get();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template<>
|
||||||
|
inline uint32_t Random::get<uint32_t>() { return Random::get_u32(); }
|
||||||
|
|
||||||
|
template<>
|
||||||
|
inline uint64_t Random::get<uint64_t>() { return Random::get_u64(); }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue