Correct return type error in hsa_amd_signal_wait_any.

The error checking macro IS_OPEN returns an hsa_signal_t.
This conflicts with the return type of uint32_t.

Add an assert and rely on spurious return rule to return zero
when rocr is not initialized.

Change-Id: Ifc9bb75e22ecdd675273de59b31e5026a69c62e0
Этот коммит содержится в:
Sean Keely
2020-08-28 02:22:07 -05:00
родитель 248904ab26
Коммит a3c4aaf95a
+4 -1
Просмотреть файл
@@ -475,7 +475,10 @@ uint32_t hsa_amd_signal_wait_any(uint32_t signal_count, hsa_signal_t* hsa_signal
uint64_t timeout_hint, hsa_wait_state_t wait_hint,
hsa_signal_value_t* satisfying_value) {
TRY;
IS_OPEN();
if (!core::Runtime::runtime_singleton_->IsOpen()) {
assert(false && "hsa_amd_signal_wait_any called while not initialized.");
return uint32_t(0);
}
// Do not check for signal invalidation. Invalidation may occur during async
// signal handler loop and is not an error.
for (uint i = 0; i < signal_count; i++)