Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 250f8a7

Browse files
committed
Rewrite comment for shm_mq_receive_bytes.
The comment and the code diverged at some point before the initial commit of this feature, and I failed to notice. Noted by Tom Lane.
1 parent f7271c4 commit 250f8a7

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/backend/storage/ipc/shm_mq.c

+6-5
Original file line numberDiff line numberDiff line change
@@ -763,11 +763,12 @@ shm_mq_send_bytes(shm_mq_handle *mqh, Size nbytes, void *data, bool nowait,
763763

764764
/*
765765
* Wait until at least *nbytesp bytes are available to be read from the
766-
* shared message queue, or until the buffer wraps around. On return,
767-
* *datap is set to the location at which data bytes can be read. The
768-
* return value is the number of bytes available to be read starting at
769-
* that offset; if the message has wrapped the buffer, it may be less than
770-
* bytes_needed.
766+
* shared message queue, or until the buffer wraps around. If the queue is
767+
* detached, returns SHM_MQ_DETACHED. If nowait is specified and a wait
768+
* would be required, returns SHM_MQ_WOULD_BLOCK. Otherwise, *datap is set
769+
* to the location at which data bytes can be read, *nbytesp is set to the
770+
* number of bytes which can be read at that address, and the return value
771+
* is SHM_MQ_SUCCESS.
771772
*/
772773
static shm_mq_result
773774
shm_mq_receive_bytes(shm_mq *mq, Size bytes_needed, bool nowait,

0 commit comments

Comments
 (0)