diff options
author | Matt Raybuck <mraybuc@us.ibm.com> | 2019-01-09 14:41:16 -0600 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2019-01-10 14:48:19 -0600 |
commit | 1ba78c4580b6067882d62909c2ce2941ad36008d (patch) | |
tree | c9573a7234fc20200cb2122e54b09a1ad0930846 | |
parent | 8c09e8bd73d7f7784dbc22969e5f20c8dc8a4bed (diff) | |
download | talos-hostboot-1ba78c4580b6067882d62909c2ce2941ad36008d.tar.gz talos-hostboot-1ba78c4580b6067882d62909c2ce2941ad36008d.zip |
Fix intermittent Jenkins CI fail
There is an intermittent CI fail where test case modules will time out
due to an assert in sync.C. This will prevent the assert from occuring
if too many calls to mutex unlock are made.
Change-Id: Iff90cc31a4faefa4eeef8d0675b804bec0f2a7d2
CQ:SW453293
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/70265
Reviewed-by: Ilya Smirnov <ismirno@us.ibm.com>
Reviewed-by: Michael Baiocchi <mbaiocch@us.ibm.com>
Reviewed-by: Roland Veloz <rveloz@us.ibm.com>
Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
-rw-r--r-- | src/lib/sync.C | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/sync.C b/src/lib/sync.C index 210790074..420fb3416 100644 --- a/src/lib/sync.C +++ b/src/lib/sync.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2011,2018 */ +/* Contributors Listed Below - COPYRIGHT 2011,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -243,7 +243,7 @@ void mutex_unlock(mutex_t * i_mutex) uint64_t l_lockStatus = __sync_fetch_and_sub(&(i_mutex->iv_val), 1); - if(unlikely(l_lockStatus == 2)) + if(unlikely(l_lockStatus >= 2)) { // Fully release the lock and let another task grab it. i_mutex->iv_val = 0; @@ -351,7 +351,7 @@ void recursive_mutex_unlock(mutex_t * i_mutex) // to l_lockStatus. l_lockStatus = __sync_fetch_and_sub(&(i_mutex->iv_val),1); - if(unlikely(l_lockStatus == 2)) + if(unlikely(l_lockStatus >= 2)) { // Fully release the lock to allow the next task to grab it. i_mutex->iv_val = 0; |