summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobert Haas2014-03-18 15:51:51 +0000
committerRobert Haas2014-03-18 15:53:28 +0000
commit250f8a7bbe83a7dbc9618c0a506f7170ab610e4b (patch)
tree6979dc155a66639f044f7792bba23c283c7eb0dd /src
parentf7271c44278352516ec66b2de311952ce330b6d5 (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/backend/storage/ipc/shm_mq.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/backend/storage/ipc/shm_mq.c b/src/backend/storage/ipc/shm_mq.c
index b31f4fb693c..c70f3bfb458 100644
--- a/src/backend/storage/ipc/shm_mq.c
+++ b/src/backend/storage/ipc/shm_mq.c
@@ -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
- * shared message queue, or until the buffer wraps around. On return,
- * *datap is set to the location at which data bytes can be read. The
- * return value is the number of bytes available to be read starting at
- * that offset; if the message has wrapped the buffer, it may be less than
- * bytes_needed.
+ * shared message queue, or until the buffer wraps around. If the queue is
+ * detached, returns SHM_MQ_DETACHED. If nowait is specified and a wait
+ * would be required, returns SHM_MQ_WOULD_BLOCK. Otherwise, *datap is set
+ * to the location at which data bytes can be read, *nbytesp is set to the
+ * number of bytes which can be read at that address, and the return value
+ * is SHM_MQ_SUCCESS.
*/
static shm_mq_result
shm_mq_receive_bytes(shm_mq *mq, Size bytes_needed, bool nowait,