Add an Architecture Abstraction Layer.

Currently, we support one architecture, but this provides a layer for
adding other architectures without adding more nested `#ifdef`s.

Fixes #42
This commit is contained in:
David Chisnall
2019-07-10 10:42:59 +01:00
parent e594377b8a
commit 7eabea01d6
10 changed files with 214 additions and 115 deletions

View File

@@ -30,18 +30,18 @@ private:
auto prev = ready.fetch_add(1);
if (prev + 1 == cores)
{
start = bits::tick();
start = AAL::tick();
flag = true;
}
while (!flag)
bits::pause();
AAL::pause();
f(id);
prev = complete.fetch_add(1);
if (prev + 1 == cores)
{
end = bits::tick();
end = AAL::tick();
}
}