29#ifndef SC_HOST_SEMAPHORE_H_INCLUDED_
30#define SC_HOST_SEMAPHORE_H_INCLUDED_
36#include <condition_variable>
38#if defined(_MSC_VER) && !defined(SC_WIN_DLL_WARN)
39#pragma warning(disable: 4251)
64 std::unique_lock lock(m_mtx);
65 while (m_value <= 0) {
66 m_cond_var.wait(lock);
75 std::unique_lock lock(m_mtx);
85 std::unique_lock lock(m_mtx);
87 m_cond_var.notify_one();
99 std::condition_variable m_cond_var;
virtual int get_value() const
sc_host_semaphore(int init=0)
virtual ~sc_host_semaphore()=default