Attention is currently required from: Raul Rangel, Furquan Shaikh. Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/56350 )
Change subject: lib/thread: Allow nesting thread_cooperate and thread_prevent_coop ......................................................................
Patch Set 2: Code-Review+2
(2 comments)
File src/lib/thread.c:
https://review.coreboot.org/c/coreboot/+/56350/comment/b1597399_ef373e70 PS1, Line 217: thread_cooperate();
I think moving the `initialized = 1` after the `idle_thread_init` solves that problem. […]
Good point.
https://review.coreboot.org/c/coreboot/+/56350/comment/db20970c_f19b4b0b PS1, Line 34: return (t != NULL && t->can_yield > 0);
Normally `can_yield` will be 1. It's setup by `prepare_thread`. […]
Yeah, I mean I think `can_yield` is just not a good name for a counting variable in the first place. I think "zero or non-zero" for the differentiation would be more intuitive than "one, or either zero or a negative number". It's not a big deal either way though.