kernel/x86_64: use C++11 style static assert

Signed-off-by: Paweł Dziepak <pdziepak@quarnos.org>
This commit is contained in:
Paweł Dziepak 2014-08-25 22:57:25 +02:00
parent 4b75a1e237
commit 2268a48350

View File

@ -98,7 +98,8 @@ x86_set_tls_context(Thread* thread)
static addr_t
arch_randomize_stack_pointer(addr_t value)
{
STATIC_ASSERT(MAX_RANDOM_VALUE >= B_PAGE_SIZE - 1);
static_assert(MAX_RANDOM_VALUE >= B_PAGE_SIZE - 1,
"randomization range is too big");
value -= random_value() & (B_PAGE_SIZE - 1);
return value & ~addr_t(0xf);
}