subsys: random: Fix semaphore initial count of xoroshiro128
Semaphore state_sem initial count is set to 0 but k_sem_give()
is invoked first in sys_rand32_get() which will block the caller
forever.
Fix the issue by setting the initail count to count_limit.
Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
diff --git a/subsys/random/rand32_xoroshiro128.c b/subsys/random/rand32_xoroshiro128.c
index 02ae88e..4f53dea 100644
--- a/subsys/random/rand32_xoroshiro128.c
+++ b/subsys/random/rand32_xoroshiro128.c
@@ -43,7 +43,7 @@
static u64_t state[2];
static bool initialized;
-K_SEM_DEFINE(state_sem, 0, 1);
+K_SEM_DEFINE(state_sem, 1, 1);
static inline u64_t rotl(const u64_t x, int k)
{