fdba8be777
This test was written to assume that the only IPI handled would be the one generated by the test, but the scheduler also generates an IPI any time a thread becomes runnable, and there's no way to lock that out in an SMP system where the other CPU is going to be doing its own thing (we can't use "1cpu" because that locks interrupts on the other CPU and obviously this is a test of an interrupt). Change the logic to detect that "at least one IPI was received", which is fine for coverage. Really a better place for a test like this would have been tests/kernel/mp, which is a test of the lower level APIs and runs the other CPU deterministically (i.e. not under the control of the Zephyr scheduler). Also some misc fixes: * Don't busy wait at the start, that's needless. * Sleep instead of busywaiting after sending the IPI, spinning isn't needed here and acts to increase CI load needlessly. * Declare the cross thread signal variable volatile for correctness (though this error seems to have been benign in practice). Signed-off-by: Andy Ross <andrew.j.ross@intel.com> |
||
---|---|---|
.. | ||
main.c |