Kernel: Add templated get function for Random
This commit is contained in:
@@ -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(); }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user