diff options
author | dimitri staessens <[email protected]> | 2017-04-04 19:25:07 +0000 |
---|---|---|
committer | Sander Vrijders <[email protected]> | 2017-04-04 19:25:07 +0000 |
commit | 10195b445b6788c60dfd851e3095fdfcb903e574 (patch) | |
tree | 90119764d07d52c2966425e34b07621e5b00fc8c /src/lib | |
parent | 99ff1ce1bd4602b471b758a144f372bc6e1570f8 (diff) | |
parent | 8a2fd3b8efc2de080349c4ab50a314748adc2699 (diff) | |
download | ouroboros-10195b445b6788c60dfd851e3095fdfcb903e574.tar.gz ouroboros-10195b445b6788c60dfd851e3095fdfcb903e574.zip |
Merged in dstaesse/ouroboros/be-local (pull request #461)
ipcpd: Remove unnecessary locks in local
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/shm_rbuff_ll.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/shm_rbuff_ll.c b/src/lib/shm_rbuff_ll.c index d777de8b..1e072b21 100644 --- a/src/lib/shm_rbuff_ll.c +++ b/src/lib/shm_rbuff_ll.c @@ -244,14 +244,14 @@ int shm_rbuff_write(struct shm_rbuff * rb, nhead = RB_HEAD; + *(rb->shm_base + nhead) = (ssize_t) idx; + do { ohead = nhead; nhead = (ohead + 1) & ((SHM_BUFFER_SIZE) - 1); nhead = __sync_val_compare_and_swap(rb->head, ohead, nhead); } while (nhead != ohead); - *(rb->shm_base + nhead) = (ssize_t) idx; - if (was_empty) pthread_cond_broadcast(rb->add); |