PityTest11 is a very flexible C++11 peer-to-peer test framework supporting hierarchically structured test suites, multi-processing, transport system, logging, IPC, synchronization and more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

28 lines
625 B

// This file is under GNU General Public License 3.0
// see LICENSE.txt
#ifndef FS_MUTEX
#define FS_MUTEX
#include <iostream>
namespace pEp {
namespace PityTest11 {
// a very primitive IPC sync method
// also unreliable
// but good enough for what i just needed it for
class fs_mutex {
public:
fs_mutex() = delete;
fs_mutex(std::string mutexpath);
void aquire() const;
void release() const;
private:
const std::string mutexpath;
};
} // namespace PityTest11
} // namespace pEp
#endif // FS_MUTEX