MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / size

Method size

app/src/IO/CircularBuffer.h:248–257  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

246 */
247template<typename T, Concepts::ByteLike StorageType>
248qsizetype IO::CircularBuffer<T, StorageType>::size() const noexcept
249{
250 const qsizetype head = m_head.load(std::memory_order_acquire);
251 const qsizetype tail = m_tail.load(std::memory_order_acquire);
252
253 if (tail >= head)
254 return tail - head;
255 else
256 return m_capacity - head + tail;
257}
258
259/**
260 * @brief Returns the free space available in the buffer.

Callers 15

readMethod · 0.95
discardMethod · 0.95
peekRangeIntoMethod · 0.95
Checksum.hFile · 0.45
computeChecksumFunction · 0.45
ConnectionManagerMethod · 0.45
writeDataToDeviceMethod · 0.45
setBusTypeMethod · 0.45
syncUiDriverToLiveMethod · 0.45
appendChunkMethod · 0.45

Calls 1

loadMethod · 0.45

Tested by 1

displayOutputMethod · 0.36