tests: kernel: spinlock: Increase lock contention
This commit resolves lock contention issues by increasing the probablity of contention during the test execution. Increased wait delay when lock is taken and Reduced wait delay when the lock is released. Achieved 99% lock contention probablity, verified through runtime metrices. Signed-off-by: S Swetha <s.swetha@intel.com>
This commit is contained in:
parent
c09ec58f01
commit
cbc5fdbb4b
1 changed files with 2 additions and 2 deletions
|
@ -83,7 +83,7 @@ static void bounce_once(int id, bool trylock)
|
|||
}
|
||||
|
||||
k_spin_unlock(&bounce_lock, key);
|
||||
k_busy_wait(100);
|
||||
k_busy_wait(1);
|
||||
}
|
||||
|
||||
if (!locked && bounce_done) {
|
||||
|
@ -99,7 +99,7 @@ static void bounce_once(int id, bool trylock)
|
|||
|
||||
for (i = 0; i < 5; i++) {
|
||||
zassert_true(bounce_owner == id, "Locked data changed");
|
||||
k_busy_wait(1);
|
||||
k_busy_wait(5);
|
||||
}
|
||||
|
||||
/* Release the lock */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue