I need to port sqlite to an embeded non-posix OS. Problem is that OS doesn't support posix file locking mechanism. Is there any userspace posix lock library implementation that I may use?
Asked
Active
Viewed 53 times
0
-
The full semantics would seem tricky to implement in a sensible way from common primitives. I don't know the particulars of SQLite but perhaps you might substitute a less fine-grained lock provided by your OS if your application does not require a high degree of concurrency? – doynax Feb 23 '15 at 12:23
-
@doynax Concurrency is the main problem I'm trying to solve. Basically there will be multiple binaries that will access same DB simultaneously. And there is no shared lock equivalent in OS. The only idea I could come up with is to create a temporary locking file that will hold: PID, Lock type and Lock range for every lock. It will add an overhead, but at least it will work. – incogn1to Feb 23 '15 at 13:12
-
Can you run one instance of sqlite acting as a local server for multiple clients? – Chris Stratton Feb 23 '15 at 16:49