Skip to content

Commit

Permalink
fix memory wait for user scheduler (cont)
Browse files Browse the repository at this point in the history
fix a bug in "fix memory wait for user scheduler" commit

also, add a trace
  • Loading branch information
yamt committed May 26, 2023
1 parent d386c15 commit 33ad7ee
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/waitlist.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ waiter_block(struct waiter_list *l, struct toywasm_mutex *lock,
if (ret == ETIMEDOUT) {
#if defined(TOYWASM_USE_USER_SCHED)
struct timespec now;
ret = timespec_now(CLOCK_REALTIME, &now);
if (ret != 0) {
int ret1 = timespec_now(CLOCK_REALTIME, &now);
if (ret1 != 0) {
break;
}
if (timespec_cmp(&now, abstimeout) < 0) {
Expand All @@ -159,6 +159,7 @@ waiter_block(struct waiter_list *l, struct toywasm_mutex *lock,
}
assert(ret == 0);
}
xlog_trace("%s: woken=%d, ret=%d", __func__, (int)w->woken, ret);
return ret;
}

Expand Down

0 comments on commit 33ad7ee

Please sign in to comment.