From f25dc7f78345a6885dff6057aecfba7afa8c81dc Mon Sep 17 00:00:00 2001 From: "E. Scott Daniels" Date: Wed, 6 May 2020 15:45:49 -0400 Subject: [PATCH] Fix semaphore count bug in SI95 non-blocking rcv When a non-blocking receive is invoked it is possible that the semaphore count was not being decremented as the message is popped off the ring. This corrects that. Issue-ID: RIC-355 Signed-off-by: E. Scott Daniels Change-Id: If502f6f85c7ea5960f38e61fc8e3e29427b4c30f --- CHANGES_CORE.txt | 4 ++++ CMakeLists.txt | 2 +- docs/rel-notes.rst | 17 ++++++++++++++--- src/rmr/si/src/rmr_si.c | 2 ++ 4 files changed, 21 insertions(+), 4 deletions(-) diff --git a/CHANGES_CORE.txt b/CHANGES_CORE.txt index d9d558c..6bcb808 100644 --- a/CHANGES_CORE.txt +++ b/CHANGES_CORE.txt @@ -5,6 +5,10 @@ # API and build change and fix summaries. Doc correctsions # and/or changes are not mentioned here; see the commit messages. +2020 May 06; version 4.0.5 + Fix the bug in SI95 receive message management semaphore count + issue. (RIC-355) + 2020 April 29; version 4.0.4 Fix the traffic steering message type constants (again) (RIC-342) diff --git a/CMakeLists.txt b/CMakeLists.txt index 17be9ed..be08394 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,7 +41,7 @@ cmake_minimum_required( VERSION 3.5 ) set( major_version "4" ) # should be automatically populated from git tag later, but until CI process sets a tag we use this set( minor_version "0" ) -set( patch_level "4" ) +set( patch_level "5" ) set( install_root "${CMAKE_INSTALL_PREFIX}" ) set( install_inc "include/rmr" ) diff --git a/docs/rel-notes.rst b/docs/rel-notes.rst index 7bffa86..04814bd 100644 --- a/docs/rel-notes.rst +++ b/docs/rel-notes.rst @@ -1,5 +1,3 @@ - - .. This work is licensed under a Creative Commons Attribution 4.0 International License. .. SPDX-License-Identifier: CC-BY-4.0 .. CAUTION: this document is generated from source in doc/src/rtd. @@ -7,7 +5,6 @@ .. Do NOT make changes directly to .rst or .md files. - RMR Release Notes ============================================================================================ @@ -30,6 +27,20 @@ Core RMR Changes -------------------------------------------------------------------------------------------- +2020 May 06; version 4.0.5 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Fix the bug in SI95 receive message management semaphore +count issue. (RIC-355) + + +2020 April 29; version 4.0.4 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Fix the traffic steering message type constants (again) +(RIC-342) + + 2020 April 28; version 4.0.3 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/src/rmr/si/src/rmr_si.c b/src/rmr/si/src/rmr_si.c index 712275e..c5041b3 100644 --- a/src/rmr/si/src/rmr_si.c +++ b/src/rmr/si/src/rmr_si.c @@ -867,6 +867,8 @@ extern rmr_mbuf_t* rmr_mt_rcv( void* vctx, rmr_mbuf_t* mbuf, int max_wait ) { if( max_wait == 0 ) { // one shot poll; handle wihtout sem check as that is SLOW! if( (mbuf = (rmr_mbuf_t *) uta_ring_extract( ctx->mring )) != NULL ) { // pop if queued + clock_gettime( CLOCK_REALTIME, &ts ); // pass current time as expriry time + sem_timedwait( &chute->barrier, &ts ); // must pop the count (ring is locking so if we got a message we can pop) if( ombuf ) { rmr_free_msg( ombuf ); // can't reuse, caller's must be trashed now } -- 2.16.6