mirror of
https://github.com/mmueller41/genode.git
synced 2026-01-21 12:32:56 +01:00
fixup "base: remove base/internal/unmanaged_singleton.h" (armv6)
This commit is contained in:
@@ -28,8 +28,16 @@ __attribute__((aligned(get_page_size())));
|
||||
|
||||
Bootstrap::Platform & Bootstrap::platform()
|
||||
{
|
||||
static Bootstrap::Platform platform { };
|
||||
return platform;
|
||||
/*
|
||||
* Don't use static local variable because cmpxchg cannot be executed
|
||||
* w/o MMU on ARMv6.
|
||||
*/
|
||||
static long _obj[(sizeof(Bootstrap::Platform)+sizeof(long))/sizeof(long)];
|
||||
static Bootstrap::Platform *ptr;
|
||||
if (!ptr)
|
||||
ptr = construct_at<Bootstrap::Platform>(_obj);
|
||||
|
||||
return *ptr;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user