<p style="white-space: pre-wrap; word-wrap: break-word;">Please again, explain in the commit description why is this needed and how will it be used within osmo-mgw.<br>It may be useful to move this kind of generic queue into libomoscore?<br></p><p><a href="https://gerrit.osmocom.org/c/osmo-mgw/+/25431">View Change</a></p><p>8 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/osmo-mgw/+/25431/12//COMMIT_MSG">Commit Message:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-mgw/+/25431/12//COMMIT_MSG@7">Patch Set #12, Line 7:</a> <code style="font-family:monospace,monospace">add a lock-free bounded spsc interthread queue</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">spsc?</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/osmo-mgw/+/25431/12/include/osmocom/mgcp/mgcp_threads_queue.h">File include/osmocom/mgcp/mgcp_threads_queue.h:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-mgw/+/25431/12/include/osmocom/mgcp/mgcp_threads_queue.h@26">Patch Set #12, Line 26:</a> <code style="font-family:monospace,monospace">struct spsc {</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Write "Single Producer Single Consumer" somewhere please.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-mgw/+/25431/12/include/osmocom/mgcp/mgcp_threads_queue.h@35">Patch Set #12, Line 35:</a> <code style="font-family:monospace,monospace">       void *buf;</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">some documentation for the fields would be great too.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-mgw/+/25431/12/include/osmocom/mgcp/mgcp_threads_queue.h@39">Patch Set #12, Line 39:</a> <code style="font-family:monospace,monospace">struct qchan {</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Same here.</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/osmo-mgw/+/25431/12/src/libosmo-mgcp/mgcp_threads_queue.c">File src/libosmo-mgcp/mgcp_threads_queue.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-mgw/+/25431/12/src/libosmo-mgcp/mgcp_threads_queue.c@52">Patch Set #12, Line 52:</a> <code style="font-family:monospace,monospace"> struct spsc *q = calloc(1, sizeof(struct spsc) + sizeof(uintptr_t) * count);</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">talloc_zero?</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-mgw/+/25431/12/src/libosmo-mgcp/mgcp_threads_queue.c@59">Patch Set #12, Line 59:</a> <code style="font-family:monospace,monospace">    q->buf = calloc(count, size_per_buf);</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">talloc?</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-mgw/+/25431/12/src/libosmo-mgcp/mgcp_threads_queue.c@117">Patch Set #12, Line 117:</a> <code style="font-family:monospace,monospace">bool spsc_pop(struct spsc *q, void *elem)</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">All this file needs a lots more documentation in general.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-mgw/+/25431/12/src/libosmo-mgcp/mgcp_threads_queue.c@139">Patch Set #12, Line 139:</a> <code style="font-family:monospace,monospace">   struct qchan q; // = calloc(1, sizeof(struct qchan));</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">this calloc comment can be dropped?</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-mgw/+/25431">change 25431</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/osmo-mgw/+/25431"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-mgw </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I4f17042baf76d086ce6b20eb99402dc64c22c657 </div>
<div style="display:none"> Gerrit-Change-Number: 25431 </div>
<div style="display:none"> Gerrit-PatchSet: 12 </div>
<div style="display:none"> Gerrit-Owner: Hoernchen <ewild@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-CC: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Fri, 10 Sep 2021 12:11:28 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Gerrit-MessageType: comment </div>