summaryrefslogtreecommitdiff
path: root/src/protocols/core/Shm.cpp
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2024-06-08 17:27:50 +0200
committerVaxry <vaxry@vaxry.net>2024-06-08 17:27:56 +0200
commit9994b73ad0af5c9ba5fc4058234cea77d0a1ddb1 (patch)
treefe5785672dde5259d45ad9bf76f25135355ffdd1 /src/protocols/core/Shm.cpp
parentd724556b7ece61a5ff4eb764e6f47ec8089439bf (diff)
buffer: track asynchronous buffers and don't release them until unref
synchronous buffers are read instantly and we can release them, but asynchronous ones have to be locked until they are unref'd from .current to avoid reading from a buffer after .release()
Diffstat (limited to 'src/protocols/core/Shm.cpp')
-rw-r--r--src/protocols/core/Shm.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/protocols/core/Shm.cpp b/src/protocols/core/Shm.cpp
index 0c01cf80..ce7d3a61 100644
--- a/src/protocols/core/Shm.cpp
+++ b/src/protocols/core/Shm.cpp
@@ -49,6 +49,10 @@ eBufferType CWLSHMBuffer::type() {
return BUFFER_TYPE_SHM;
}
+bool CWLSHMBuffer::isSynchronous() {
+ return true;
+}
+
SSHMAttrs CWLSHMBuffer::shm() {
SSHMAttrs attrs;
attrs.success = true;