Loading media/bufferpool/1.0/AccessorImpl.cpp +9 −4 Original line number Diff line number Diff line Loading @@ -14,10 +14,11 @@ * limitations under the License. */ #define LOG_TAG "BufferPoolAccessor" #define LOG_TAG "BufferPoolAccessor1.0" //#define LOG_NDEBUG 0 #include <sys/types.h> #include <stdint.h> #include <time.h> #include <unistd.h> #include <utils/Log.h> Loading Loading @@ -127,7 +128,6 @@ bool contains(std::map<T, std::set<U>> *mapOfSet, T key, U value) { return false; } int32_t Accessor::Impl::sPid = getpid(); uint32_t Accessor::Impl::sSeqId = time(nullptr); Accessor::Impl::Impl( Loading @@ -145,16 +145,21 @@ ResultStatus Accessor::Impl::connect( { std::lock_guard<std::mutex> lock(mBufferPool.mMutex); if (newConnection) { ConnectionId id = (int64_t)sPid << 32 | sSeqId; int32_t pid = getpid(); ConnectionId id = (int64_t)pid << 32 | sSeqId; status = mBufferPool.mObserver.open(id, fmqDescPtr); if (status == ResultStatus::OK) { newConnection->initialize(accessor, id); *connection = newConnection; *pConnectionId = id; mBufferPool.mConnectionIds.insert(id); if (sSeqId == UINT32_MAX) { sSeqId = 0; } else { ++sSeqId; } } } mBufferPool.processStatusMessages(); mBufferPool.cleanUp(); } Loading media/bufferpool/1.0/AccessorImpl.h +0 −1 Original line number Diff line number Diff line Loading @@ -61,7 +61,6 @@ private: // ConnectionId = pid : (timestamp_created + seqId) // in order to guarantee uniqueness for each connection static uint32_t sSeqId; static int32_t sPid; const std::shared_ptr<BufferPoolAllocator> mAllocator; Loading media/bufferpool/2.0/AccessorImpl.cpp +9 −4 Original line number Diff line number Diff line Loading @@ -14,10 +14,11 @@ * limitations under the License. */ #define LOG_TAG "BufferPoolAccessor" #define LOG_TAG "BufferPoolAccessor2.0" //#define LOG_NDEBUG 0 #include <sys/types.h> #include <stdint.h> #include <time.h> #include <unistd.h> #include <utils/Log.h> Loading Loading @@ -134,7 +135,6 @@ bool contains(std::map<T, std::set<U>> *mapOfSet, T key, U value) { return false; } int32_t Accessor::Impl::sPid = getpid(); uint32_t Accessor::Impl::sSeqId = time(nullptr); Accessor::Impl::Impl( Loading @@ -156,7 +156,8 @@ ResultStatus Accessor::Impl::connect( { std::lock_guard<std::mutex> lock(mBufferPool.mMutex); if (newConnection) { ConnectionId id = (int64_t)sPid << 32 | sSeqId; int32_t pid = getpid(); ConnectionId id = (int64_t)pid << 32 | sSeqId; status = mBufferPool.mObserver.open(id, statusDescPtr); if (status == ResultStatus::OK) { newConnection->initialize(accessor, id); Loading @@ -166,8 +167,12 @@ ResultStatus Accessor::Impl::connect( mBufferPool.mConnectionIds.insert(id); mBufferPool.mInvalidationChannel.getDesc(invDescPtr); mBufferPool.mInvalidation.onConnect(id, observer); if (sSeqId == UINT32_MAX) { sSeqId = 0; } else { ++sSeqId; } } } mBufferPool.processStatusMessages(); Loading media/bufferpool/2.0/AccessorImpl.h +0 −1 Original line number Diff line number Diff line Loading @@ -75,7 +75,6 @@ private: // ConnectionId = pid : (timestamp_created + seqId) // in order to guarantee uniqueness for each connection static uint32_t sSeqId; static int32_t sPid; const std::shared_ptr<BufferPoolAllocator> mAllocator; Loading Loading
media/bufferpool/1.0/AccessorImpl.cpp +9 −4 Original line number Diff line number Diff line Loading @@ -14,10 +14,11 @@ * limitations under the License. */ #define LOG_TAG "BufferPoolAccessor" #define LOG_TAG "BufferPoolAccessor1.0" //#define LOG_NDEBUG 0 #include <sys/types.h> #include <stdint.h> #include <time.h> #include <unistd.h> #include <utils/Log.h> Loading Loading @@ -127,7 +128,6 @@ bool contains(std::map<T, std::set<U>> *mapOfSet, T key, U value) { return false; } int32_t Accessor::Impl::sPid = getpid(); uint32_t Accessor::Impl::sSeqId = time(nullptr); Accessor::Impl::Impl( Loading @@ -145,16 +145,21 @@ ResultStatus Accessor::Impl::connect( { std::lock_guard<std::mutex> lock(mBufferPool.mMutex); if (newConnection) { ConnectionId id = (int64_t)sPid << 32 | sSeqId; int32_t pid = getpid(); ConnectionId id = (int64_t)pid << 32 | sSeqId; status = mBufferPool.mObserver.open(id, fmqDescPtr); if (status == ResultStatus::OK) { newConnection->initialize(accessor, id); *connection = newConnection; *pConnectionId = id; mBufferPool.mConnectionIds.insert(id); if (sSeqId == UINT32_MAX) { sSeqId = 0; } else { ++sSeqId; } } } mBufferPool.processStatusMessages(); mBufferPool.cleanUp(); } Loading
media/bufferpool/1.0/AccessorImpl.h +0 −1 Original line number Diff line number Diff line Loading @@ -61,7 +61,6 @@ private: // ConnectionId = pid : (timestamp_created + seqId) // in order to guarantee uniqueness for each connection static uint32_t sSeqId; static int32_t sPid; const std::shared_ptr<BufferPoolAllocator> mAllocator; Loading
media/bufferpool/2.0/AccessorImpl.cpp +9 −4 Original line number Diff line number Diff line Loading @@ -14,10 +14,11 @@ * limitations under the License. */ #define LOG_TAG "BufferPoolAccessor" #define LOG_TAG "BufferPoolAccessor2.0" //#define LOG_NDEBUG 0 #include <sys/types.h> #include <stdint.h> #include <time.h> #include <unistd.h> #include <utils/Log.h> Loading Loading @@ -134,7 +135,6 @@ bool contains(std::map<T, std::set<U>> *mapOfSet, T key, U value) { return false; } int32_t Accessor::Impl::sPid = getpid(); uint32_t Accessor::Impl::sSeqId = time(nullptr); Accessor::Impl::Impl( Loading @@ -156,7 +156,8 @@ ResultStatus Accessor::Impl::connect( { std::lock_guard<std::mutex> lock(mBufferPool.mMutex); if (newConnection) { ConnectionId id = (int64_t)sPid << 32 | sSeqId; int32_t pid = getpid(); ConnectionId id = (int64_t)pid << 32 | sSeqId; status = mBufferPool.mObserver.open(id, statusDescPtr); if (status == ResultStatus::OK) { newConnection->initialize(accessor, id); Loading @@ -166,8 +167,12 @@ ResultStatus Accessor::Impl::connect( mBufferPool.mConnectionIds.insert(id); mBufferPool.mInvalidationChannel.getDesc(invDescPtr); mBufferPool.mInvalidation.onConnect(id, observer); if (sSeqId == UINT32_MAX) { sSeqId = 0; } else { ++sSeqId; } } } mBufferPool.processStatusMessages(); Loading
media/bufferpool/2.0/AccessorImpl.h +0 −1 Original line number Diff line number Diff line Loading @@ -75,7 +75,6 @@ private: // ConnectionId = pid : (timestamp_created + seqId) // in order to guarantee uniqueness for each connection static uint32_t sSeqId; static int32_t sPid; const std::shared_ptr<BufferPoolAllocator> mAllocator; Loading