xtd 0.2.0
Loading...
Searching...
No Matches
named_mutex.hpp
Go to the documentation of this file.
1
4#pragma once
6#if !defined(__XTD_CORE_NATIVE_LIBRARY__)
7#error "Do not include this file: Internal use only"
8#endif
10
11#include <xtd/core_native_export>
12#include <cstddef>
13#include <cstdint>
14#include <string>
15
17namespace xtd {
19 namespace threading {
20 class mutex;
21 }
23
26 namespace native {
34 class core_native_export_ named_mutex final {
35 named_mutex() = delete;
37 protected:
39
46 static intmax_t create(bool initially_owned, const std::string& name);
47
52 static void destroy(intmax_t handle, const std::string& name);
53
57 static size_t max_name_size();
58
63 static intmax_t open(const std::string& name);
64
69 static bool signal(intmax_t handle, bool& io_error);
70
80 static uint32_t wait(intmax_t handle, int32_t milliseconds_timeout);
82 };
83 }
84}
Contains named_mutex native API.
Definition named_mutex.hpp:34
static intmax_t create(bool initially_owned, const std::string &name)
Create named mutex with specified name and a bool value that.
static uint32_t wait(intmax_t handle, int32_t milliseconds_timeout)
Wait named mutex with specified mutex handle and timeout.
static size_t max_name_size()
Gets the maximum name size supported.
static void destroy(intmax_t handle, const std::string &name)
Destroy named mutex with specified mutex handle.
static bool signal(intmax_t handle, bool &io_error)
Signal named mutex with specified mutex handle.
static intmax_t open(const std::string &name)
Open named mutex with specified name.
A synchronization primitive that can also be used for interprocess synchronization.
Definition mutex.hpp:50
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10