#include <atomic>
#include <cstring>
#include <mutex>
#include <sstream>
#include <cerrno>
#include <fcntl.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <unistd.h>
#include "pstore/os/uint64.hpp"
#include "pstore/support/error.hpp"
#include "pstore/support/quoted.hpp"
Go to the source code of this file.
|
|
std::size_t | pstore::get_pshmnamlen () noexcept |
| | A function which returns the maximum length of a shared memory object name.
|
| |
|
| template<typename SpanType > |
| auto | pstore::posix::shm_name (std::string const &name, SpanType arr) -> ::pstore::gsl::zstring |
| |
|
template<std::size_t N> |
| auto | pstore::posix::shm_name (std::string const &name, std::array< char, N > &arr) -> ::pstore::gsl::zstring |
| |
◆ shm_name()
template<typename SpanType >
| auto pstore::posix::shm_name |
( |
std::string const & |
name, |
|
|
SpanType |
arr |
|
) |
| -> ::pstore::gsl::zstring |
Used to build a name beginning with a slash character for a POSIX shared memory object. Following the initial slash, as many characters as possible from 'name' are copied to the output array (arr) followed by a terminating null.
- Parameters
-
| name | The name to be copied |
| arr | An array into which the characters are copied. |
- Returns
- A pointer to the output null-terminated string. Equivalent to arr.data ().