32 #ifndef _util_group_memshm_h
33 #define _util_group_memshm_h
35 #include <sys/types.h>
40 #include <util/group/globcnt.h>
41 #include <util/group/memmsg.h>
43 #include <util/group/rnglock.h>
54 void **attach_address_;
62 void clear_release_count();
63 void wait_for_release();
69 int attach_memory(
void *ataddress,
int size);
void * obtain_readonly(distsize_t offset, int size)
This gives read access to the memory location. No locking is done.
void * localdata()
Returns a pointer to the local data.
distsize_t offset(int node)
Returns the global offset to node's memory.
Definition: memory.h:168
A template class that maintains references counts.
Definition: ref.h:332
void * obtain_writeonly(distsize_t offset, int size)
This gives write access to the memory location. No locking is done.
void set_localsize(size_t)
Set the size of locally held memory.
The ShmMemoryGrp concrete class provides an implementation of MsgMemoryGrp.
Definition: memshm.h:50
void print(std::ostream &o=ExEnv::out0()) const
Prints out information about the object.
int size(int node)
Returns the amount of memory residing on node.
Definition: memory.h:165
void * obtain_readwrite(distsize_t offset, int size)
Only one thread can have an unreleased obtain_readwrite at a time.
void release_readwrite(void *data, distsize_t offset, int size)
This is called when read/write access is no longer needed.
void release_readonly(void *data, distsize_t offset, int size)
This is called when read access is no longer needed.
static std::ostream & out0()
Return an ostream that writes from node 0.
void release_writeonly(void *data, distsize_t offset, int size)
This is called when write access is no longer needed.
A MsgMemoryGrp that initializes its data using a messagegrp.
Definition: memmsg.h:41
Generated at Sun Jan 26 2020 23:33:04 for MPQC
2.3.1 using the documentation package Doxygen
1.8.16.