From a9a224c3e494b10cc15e08a55aa1a4de7f7e6593 Mon Sep 17 00:00:00 2001 From: Liu <46311996+gh-liu@users.noreply.github.com> Date: Thu, 16 May 2024 11:00:22 +0800 Subject: [PATCH] docs: clearer doc for linkBufferNode mode (#331) --- nocopy.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/nocopy.go b/nocopy.go index 53acab2c..ad74634a 100644 --- a/nocopy.go +++ b/nocopy.go @@ -261,10 +261,12 @@ const ( minReuseBytes = 64 // only reuse bytes if n >= minReuseBytes defaultLinkBufferMode = 0 - // readonly mode indicate that the buffer node memory is not controlled by itself, - // so we cannot reuse the buffer or nocopy read it, default value is false. + // readonlyMask is used to set readonly mode, + // which indicate that the buffer node memory is not controlled by itself, + // so we cannot reuse the buffer or nocopy read it. readonlyMask uint8 = 1 << 0 // 0000 0001 - // nocopyRead mode indicate that the buffer node has been no copy read and cannot reuse the buffer, default value is false. + // readonlyMask is used to set nocopyRead mode, + // which indicate that the buffer node has been no copy read and cannot reuse the buffer. nocopyReadMask uint8 = 1 << 1 // 0000 0010 )