SDK improvements (#352)
TactilityC additions for: - C randomization functions - Tactility app paths - Tactility locks
This commit is contained in:
committed by
GitHub
parent
6dc4f698c9
commit
c7621b5e4c
@@ -0,0 +1,21 @@
|
||||
#include <tt_lock.h>
|
||||
#include <tt_lock_private.h>
|
||||
|
||||
extern "C" {
|
||||
|
||||
bool tt_lock_acquire(LockHandle handle, TickType timeout) {
|
||||
auto holder = static_cast<LockHolder*>(handle);
|
||||
return holder->lock->lock(timeout);
|
||||
}
|
||||
|
||||
bool tt_lock_release(LockHandle handle) {
|
||||
auto holder = static_cast<LockHolder*>(handle);
|
||||
return holder->lock->unlock();
|
||||
}
|
||||
|
||||
void tt_lock_free(LockHandle handle) {
|
||||
auto holder = static_cast<LockHolder*>(handle);
|
||||
delete holder;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user