SDK improvements (#352)

TactilityC additions for:
- C randomization functions
- Tactility app paths
- Tactility locks
This commit is contained in:
Ken Van Hoeylandt
2025-09-29 22:45:14 +02:00
committed by GitHub
parent 6dc4f698c9
commit c7621b5e4c
13 changed files with 204 additions and 18 deletions
+21
View File
@@ -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;
}
}