arm: add host uart driver tests
All host tests currently pass Some async refactors may not work well on device, will try later
This commit is contained in:
10
arm/lock.h
10
arm/lock.h
@@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef __x86_64__
|
||||
#include "aum1_cm1.h"
|
||||
|
||||
struct InterruptLock {
|
||||
@@ -11,3 +12,12 @@ struct InterruptLock {
|
||||
__set_PRIMASK(old_primask);
|
||||
}
|
||||
};
|
||||
#else // __x86_64__
|
||||
#include <mutex>
|
||||
|
||||
struct InterruptLock {
|
||||
static std::recursive_mutex m;
|
||||
InterruptLock() { m.lock(); }
|
||||
~InterruptLock() { m.unlock(); }
|
||||
};
|
||||
#endif // __x86_64__
|
||||
Reference in New Issue
Block a user