tests: pm: device_runtime: Avoid race condition
tests: pm: device_runtime: Avoid race condition

The test was done with one cpu in mind. In a SMP environment there is
race condition where the semaphor can be given before the other thread
take block waiting for it.

Fixes #40068

Signed-off-by: Flavio Ceolin <979b9165500b0741b9d0500e2efd74fc1547bff7@intel.com>

finikorg/zephyr,zephyrproject-rtos/zephyr,zephyrproject-rtos/zephyr,galak/zephyr,finikorg/zephyr,finikorg/zephyr,zephyrproject-rtos/zephyr,zephyrproject-rtos/zephyr,galak/zephyr,finikorg/zephyr,galak/zephyr,galak/zephyr,finikorg/zephyr,zephyrproject-rtos/zephyr,galak/zephyr