Maximus Minter, le mar. 07 avril 2026 22:30:33 -0400, a ecrit:
> - Fix assert assignment bugs in scheduling code (ipc_sched.c, sched_prim.c)
> diff --git a/kern/ipc_sched.c b/kern/ipc_sched.c
> index 370573ed..ed334fa5 100644
> --- a/kern/ipc_sched.c
> +++ b/kern/ipc_sched.c
> @@ -117,7 +117,7 @@ thread_will_wait(
> s = splsched();
> thread_lock(thread);
>
> - assert(thread->wait_result = -1); /* for later assertions */
> + thread->wait_result = -1; /* initialise for later assertions */
> thread->state |= TH_WAIT;
>
> thread_unlock(thread);
> @@ -142,7 +142,7 @@ thread_will_wait_with_timeout(
> s = splsched();
> thread_lock(thread);
>
> - assert(thread->wait_result = -1); /* for later assertions */
> + thread->wait_result = -1;
> thread->state |= TH_WAIT;
>
> set_timeout(&thread->timer, ticks);
> @@ -246,7 +246,7 @@ thread_handoff(
>
> thread_lock(old);
> old->swap_func = continuation;
> - assert(old->wait_result = -1); /* for later assertions */
> + old->wait_result = -1;
>
> if (old->state == TH_RUN) {
> /*
They are meant on purpose, so wait_result isn't needlessly set to -1
when assertions are not enabled.
Samuel