lmms
Cross-platform music production software
Toggle main menu visibility
Loading...
Searching...
No Matches
include
SystemSemaphore.h
Go to the documentation of this file.
1
/*
2
* SystemSemaphore.h
3
*
4
* Copyright (c) 2024 Dominic Clark
5
*
6
* This file is part of LMMS - https://lmms.io
7
*
8
* This program is free software; you can redistribute it and/or
9
* modify it under the terms of the GNU General Public
10
* License as published by the Free Software Foundation; either
11
* version 2 of the License, or (at your option) any later version.
12
*
13
* This program is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
* General Public License for more details.
17
*
18
* You should have received a copy of the GNU General Public
19
* License along with this program (see COPYING); if not, write to the
20
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21
* Boston, MA 02110-1301 USA.
22
*/
23
24
#ifndef LMMS_SYSTEM_SEMAPHORE_H
25
#define LMMS_SYSTEM_SEMAPHORE_H
26
27
#include <memory>
28
#include <string>
29
30
namespace
lmms
{
31
32
namespace
detail
{
33
34
class
SystemSemaphoreImpl;
35
36
}
// namespace detail
37
38
class
SystemSemaphore
39
{
40
public
:
41
SystemSemaphore
() noexcept;
42
SystemSemaphore
(std::
string
key
,
unsigned
int
value);
43
explicit
SystemSemaphore
(std::
string
key
);
44
~
SystemSemaphore
();
45
46
SystemSemaphore
(
SystemSemaphore
&& other) noexcept;
47
auto operator=(
SystemSemaphore
&& other) noexcept ->
SystemSemaphore
&;
48
49
auto
acquire
() noexcept ->
bool
;
50
auto
release
() noexcept ->
bool
;
51
52
auto
key
() const noexcept -> const std::
string
& {
return
m_key
; }
53
54
private
:
55
std::string
m_key
;
56
std::unique_ptr<detail::SystemSemaphoreImpl>
m_impl
;
57
};
58
59
}
// namespace lmms
60
61
#endif
// LMMS_SYSTEM_SEMAPHORE_H
lmms::SystemSemaphore::key
auto key() const noexcept -> const std::string &
Definition
SystemSemaphore.h:52
lmms::SystemSemaphore::SystemSemaphore
SystemSemaphore() noexcept
lmms::SystemSemaphore::m_key
std::string m_key
Definition
SystemSemaphore.h:55
lmms::SystemSemaphore::m_impl
std::unique_ptr< detail::SystemSemaphoreImpl > m_impl
Definition
SystemSemaphore.h:56
lmms::SystemSemaphore::release
auto release() noexcept -> bool
Definition
SystemSemaphore.cpp:179
lmms::SystemSemaphore::acquire
auto acquire() noexcept -> bool
Definition
SystemSemaphore.cpp:178
lmms::detail
Definition
SharedMemory.cpp:48
lmms
Definition
RemotePluginBase.cpp:34
Generated on
for lmms by
1.18.0