💾 Archived View for gmi.noulin.net › gitRepositories › filelock › file › test.c.gmi captured on 2023-01-29 at 13:20:14. Gemini links have been rewritten to link to archived content
-=-=-=-=-=-=-
test.c (674B)
1 #! /usr/bin/env sheepy 2 3 #include "libsheepyObject.h" 4 #include "filelock.h" 5 6 int argc; char **argv; 7 8 int main(int ARGC, char** ARGV) { 9 10 argc = ARGC; argv = ARGV; 11 12 initLibsheepy(argv[0]); 13 14 //filelockt *fileLock = allocFilelock("wefef"); 15 createAllocateFilelock(fileLock); 16 setFileG(fileLock, "w"); 17 logVarG(getFileG(fileLock)); 18 setFileG(fileLock, "wefef"); 19 filelockt *fileLock2 = allocFilelock("wefef"); 20 21 logG(fileLock); 22 23 acquireG(fileLock); 24 25 logG(fileLock); 26 27 logVarG(acquireG(fileLock2)); 28 29 releaseG(fileLock); 30 releaseG(fileLock2); 31 32 logG(fileLock); 33 34 terminateG(fileLock); 35 terminateG(fileLock2); 36 37 finalizeFilelock(); 38 finalizeLibsheepy(); 39 40 }