Skip to content

Commit 931dcf1

Browse files
committed
ATRONIX: Fix the missing port returned from wait/all
wait/all removes the first waked port in the system awake handler. cleanup the waked list before wait returns
1 parent c7e2594 commit 931dcf1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/core/c-port.c

+4-2
Original file line numberDiff line numberDiff line change
@@ -302,14 +302,16 @@ xx*/ REBINT Wait_Device(REBREQ *req, REBCNT timeout)
302302
for (n = 0; n < SERIES_TAIL(ports);) {
303303
val = BLK_SKIP(ports, n);
304304
if (IS_PORT(val)) {
305-
if (VAL_TAIL(waked) != 0
306-
&& VAL_TAIL(waked) == Find_Block_Simple(VAL_SERIES(waked), 0, val)) {//not found
305+
ASSERT(VAL_TAIL(waked) != 0, RP_IO_ERROR);
306+
if (VAL_TAIL(waked) == Find_Block_Simple(VAL_SERIES(waked), 0, val)) {//not found
307307
Remove_Series(ports, n, 1);
308308
continue;
309309
}
310310
}
311311
n++;
312312
}
313+
//clear waked list
314+
RESET_SERIES(VAL_SERIES(waked));
313315
}
314316

315317

0 commit comments

Comments
 (0)