diff options
| author | Brad Bishop <bradleyb@us.ibm.com> | 2012-09-06 08:39:28 -0500 |
|---|---|---|
| committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2012-09-07 10:14:45 -0500 |
| commit | e11fc0f4d161de3c24452ec3de9f023d60742181 (patch) | |
| tree | ce4ff03a2747d3cec0d82805d4c626bf740c9a1e | |
| parent | 19147cdfa872a06ef97b8437e2abc152c581dbb0 (diff) | |
| download | blackbird-hostboot-e11fc0f4d161de3c24452ec3de9f023d60742181.tar.gz blackbird-hostboot-e11fc0f4d161de3c24452ec3de9f023d60742181.zip | |
Attention handler workaround broken randint function.
Periodically randint isn't so random and this fake PRD
module doesn't make any progress.
Change-Id: Ia7d7d9acc0c9188d8a8e55219c2db5c699da31bc
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1697
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
| -rw-r--r-- | src/usr/diag/attn/test/attnfakeprd.C | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/src/usr/diag/attn/test/attnfakeprd.C b/src/usr/diag/attn/test/attnfakeprd.C index 058af49a3..f4f6bd4a1 100644 --- a/src/usr/diag/attn/test/attnfakeprd.C +++ b/src/usr/diag/attn/test/attnfakeprd.C @@ -55,23 +55,13 @@ struct Clear nanosleep(0, randint(TEN_CTX_SWITCHES_NS, TEN_CTX_SWITCHES_NS * 10)); - uint64_t behavior = randint(0, 2); - - switch(behavior) + if(randint(0, 10) < 8) { - case 1: - - // periodically do nothing to force the main service - // to see attentions that were not cleared and call PRD - // again - - break; - - default: - - err = iv_system->clearAllAttentions(d); + // periodically do nothing to force the main service + // to see attentions that were not cleared and call PRD + // again - break; + err = iv_system->clearAllAttentions(d); } } } |

