Commit 250f8a7b authored by Robert Haas's avatar Robert Haas

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.
parent f7271c44
...@@ -763,11 +763,12 @@ shm_mq_send_bytes(shm_mq_handle *mqh, Size nbytes, void *data, bool nowait, ...@@ -763,11 +763,12 @@ shm_mq_send_bytes(shm_mq_handle *mqh, Size nbytes, void *data, bool nowait,
/* /*
* Wait until at least *nbytesp bytes are available to be read from the * Wait until at least *nbytesp bytes are available to be read from the
* shared message queue, or until the buffer wraps around. On return, * shared message queue, or until the buffer wraps around. If the queue is
* *datap is set to the location at which data bytes can be read. The * detached, returns SHM_MQ_DETACHED. If nowait is specified and a wait
* return value is the number of bytes available to be read starting at * would be required, returns SHM_MQ_WOULD_BLOCK. Otherwise, *datap is set
* that offset; if the message has wrapped the buffer, it may be less than * to the location at which data bytes can be read, *nbytesp is set to the
* bytes_needed. * number of bytes which can be read at that address, and the return value
* is SHM_MQ_SUCCESS.
*/ */
static shm_mq_result static shm_mq_result
shm_mq_receive_bytes(shm_mq *mq, Size bytes_needed, bool nowait, shm_mq_receive_bytes(shm_mq *mq, Size bytes_needed, bool nowait,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment