tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: ucom console again [PATCH]
On Sun, Dec 21, 2025 at 09:05:19AM +0000, Nick Hudson wrote:
> I've already told you where the problem is "cn_sending is racey and it's my
> fault."
>
> Something like making ucom_cnput_bytes loop and right after it does
>
> atomic_store_relaxed(&cn->cn_sending, 0);
>
> it should re-check the ring for entries and try to set it again, etc...
If I understand you correcty, the problem is a race here (atomic
functions removed for the sake of clarity):
if (cn->cn_prod_out - cn->cn_cons_out == 0) {
/* cn->cn_prod_out is increased between the test and set */
cn->cn_sending = 0.
}
Did I get you right?
--
Emmanuel Dreyfus
manu%netbsd.org@localhost
Home |
Main Index |
Thread Index |
Old Index