On 2013-12-20 22:04:05 +0100, Andres Freund wrote: > Hi, > > On 2013-12-18 15:23:23 -0500, Robert Haas wrote: > > It sounds like most people who have looked at this stuff are broadly > > happy with it, so I'd like to push on toward commit soon, but it'd be > > helpful, Andres, if you could review the comment additions to > > shm-mq-v2.patch and see whether those address your concerns. If so, > > I'll see about improving the overall comments for shm-toc-v1.patch as > > well to clarify the points that seem to have caused a bit of > > confusion; specific thoughts on what ought to be covered there, or any > > other review, is most welcome. > > Some things:
One more thing: static uint64 shm_mq_get_bytes_written(volatile shm_mq *mq, bool *detached) { uint64 v; SpinLockAcquire(&mq->mq_mutex); v = mq->mq_bytes_written; *detached = mq->mq_detached; SpinLockRelease(&mq->mq_mutex); return mq->mq_bytes_written; } Note how you're returning mq->mq_bytes_written instead of v. Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers