Re: MP-safe /dev/console and /dev/constty

2022-10-02 Thread Mouse
>> Your suggestion of pushing it into a separate function (which >> presumably would just mean using return instead of break to >> terminate the code block) strikes me as worth considering in general >> but a bad idea in this case; there are too many things that would >> have to be passed down to

Re: MP-safe /dev/console and /dev/constty

2022-10-02 Thread Thor Lancelot Simon
On Sat, Oct 01, 2022 at 07:59:23PM -0400, Mouse wrote: > > usual approach to such things. Your suggestion of pushing it into a > separate function (which presumably would just mean using return > instead of break to terminate the code block) strikes me as worth > considering in general but a bad

Re: MP-safe /dev/console and /dev/constty

2022-10-01 Thread Mouse
> i really like this except for the if () do { ... } while (0); else > abuse portion. please rework that part. it looks easiest to push > into a separate function, perhaps. You don't say what you don't like about it. There are only two things I don't like about it, and one of them

re: MP-safe /dev/console and /dev/constty

2022-10-01 Thread matthew green
i really like this except for the if () do { ... } while (0); else abuse portion. please rework that part. it looks easiest to push into a separate function, perhaps. thanks. .mrg.

MP-safe /dev/console and /dev/constty

2022-10-01 Thread Taylor R Campbell
The attached patch series makes /dev/console and /dev/constty MP-safe, with careful rules around constty access so it doesn't add contention or mutexes to the paths used by printf(9). This passes some manual testing in qemu with TIOCCONS on a viocon(4) device, but since this touches a very