This repository has been archived on 2024-05-02. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
2022-04-05 11:42:28 +03:00

27 lines
463 B
C++

#pragma once
#include <memory>
#include <string>
namespace pangolin
{
class SemaphoreInterface
{
public:
virtual ~SemaphoreInterface() {
}
virtual bool tryAcquire() = 0;
virtual void acquire() = 0;
virtual void release() = 0;
};
std::shared_ptr<SemaphoreInterface> create_named_semaphore(const std::string& name,
unsigned int value);
std::shared_ptr<SemaphoreInterface> open_named_semaphore(const std::string& name);
}