Ken Van Hoeylandt 3802679de4
File locking and DevelopmentService improvements (#358)
- Moved `file::getlock(path)` from `Tactility` to `TactilityCore`
- Changed all existing `file::*` functions to implement locking by default
- Removed all manual locking where `file::*` functions were used
- When `DevelopmentService` receives a file, it doesn't try to allocate it all in memory. This fixes going out-of-memory on devices without PSRAM.
- Fix for TactilityC include
2025-10-05 16:16:55 +02:00

14 lines
257 B
C++

#include <tt_file.h>
#include <tt_lock_private.h>
#include <Tactility/file/File.h>
extern "C" {
LockHandle tt_lock_alloc_for_file(const char* path) {
auto lock = tt::file::getLock(path);
auto holder = new LockHolder(lock);
return holder;
}
}