31 info::
function fun(__LINE__,
__PRETTY_FUNCTION__,
typeid(open_fd), info::function::argument(
_T(
"std::string const &name"), name));
33 info::function::argument(
_T(
"oflags_type oflags"), oflags),
34 info::function::argument(
_T(
"mode_type mode"), mode)
38 return JMMCG_SYSCALL_WRAPPER(
"Failed to open shared-memory segment.", _T(LIBJMMCG_VERSION_NUMBER), ::shm_open, name.c_str(), oflags, mode);
45 info::
function fun(__LINE__,
__PRETTY_FUNCTION__,
typeid(map_fd), info::function::argument(
_T(
"handle_t fd"), fd));
47 info::function::argument(
_T(
"std::size_t length"), length),
48 info::function::argument(
_T(
"protection_type prot"), prot)
61 JMMCG_SYSCALL_WRAPPER(
"Failed to resize the shared-memory segment to the requested size.", _T(LIBJMMCG_VERSION_NUMBER), ::ftruncate, fd, length_);
66 JMMCG_SYSCALL_WRAPPER(
"Failed to unmap region.", _T(LIBJMMCG_VERSION_NUMBER), ::munmap, addr_, length_);
67 }
catch (
std::exception
const &ex) {
71 JMMCG_SYSCALL_WRAPPER(
"Failed unlink the named region.", _T(LIBJMMCG_VERSION_NUMBER), ::shm_unlink, name_.c_str());
72 }
catch (
std::exception
const &ex) {
80 info::
function fun(__LINE__,
__PRETTY_FUNCTION__,
typeid(
this), info::function::argument(
_T(
"void *addr"), addr));
82 info::function::argument(
_T(
"std::size_t length"), length),
83 info::function::argument(
_T(
"sync_flags_t sync_flags"), sync_flags),
84 info::function::argument(
_T(
"std::size_t length_"), length_)
89 info::
function fun(__LINE__,
__PRETTY_FUNCTION__,
typeid(
this), info::function::argument(
_T(
"void *addr"), addr));
91 info::function::argument(
_T(
"std::size_t length"), length),
92 info::function::argument(
_T(
"sync_flags_t sync_flags"), sync_flags),
93 info::function::argument(
_T(
"void *addr_"), addr_)
97 if ((
reinterpret_cast<
std::uint8_t
const *>(addr)+length)>(
reinterpret_cast<
std::uint8_t
const *>(addr_)+length_)) {
98 info::
function fun(__LINE__,
__PRETTY_FUNCTION__,
typeid(
this), info::function::argument(
_T(
"void *addr"), addr));
100 info::function::argument(
_T(
"std::size_t length"), length),
101 info::function::argument(
_T(
"sync_flags_t sync_flags"), sync_flags),
102 info::function::argument(
_T(
"std::size_t length_"), length_),
103 info::function::argument(
_T(
"void *addr_"), addr_)
107 JMMCG_SYSCALL_WRAPPER(
"Unable sync the portion of the mapped memory.", _T(LIBJMMCG_VERSION_NUMBER), ::msync, addr, length, sync_flags);