- Timestamp:
- Oct 15, 2015, 2:40:14 PM (9 years ago)
- Location:
- trunk/src/PacpusTools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/PacpusTools/CMakeLists.txt
r300 r350 36 36 ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/PeriodicWorker.h 37 37 ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/SharedMemory.h 38 ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/PosixShMem.h 38 39 39 40 #${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/pacpusStruct.h … … 48 49 #src/PacpusSerialPort.cpp 49 50 src/SharedMemory.cpp 51 src/PosixShMem.cpp 50 52 ) 51 53 -
trunk/src/PacpusTools/src/PosixShMem.cpp
r312 r350 104 104 105 105 ////////////////////////////////////////////////////////////////////////// 106 /// Use this method to get thedata of the shared memory106 /// Use this method to get a pointer to data of the shared memory 107 107 void * PosixShMem::read() 108 108 { 109 return shMem_; 109 void * shMem; 110 lockMemory(); 111 shMem = shMem_; 112 unlockMemory(); 113 return shMem; 114 } 115 116 ////////////////////////////////////////////////////////////////////////// 117 /// Use this method to get a pointer to data of the shared memory 118 void PosixShMem::read(void * mem, int size) 119 { 120 lockMemory(); 121 memcpy(mem,shMem_,size); 122 unlockMemory(); 110 123 } 111 124
Note:
See TracChangeset
for help on using the changeset viewer.