Fixes bug 210413.
Diff Detail
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
sys/dev/vt/vt_buf.c | ||
---|---|---|
641–643 | minor style(9) nit, convention is to in general not initialize variables in declarations. Also a blank line should follow the declarations. | |
sys/dev/vt/vt_core.c | ||
1068 | This fn could be simplified slightly by just naming this parameter invert, and making the TF_REVERSE check do invert = !invert; | |
2880 | minor whitespace issue: extra blank line |
style(9) issues still here (but in different functions), but there is a lot from very first vt project release.
One callout per window, plus flushing all windows twice per second is probably inefficient, on top of a vt(4) which is already slower than syscons(4).
Could you please experiment with something integrated to the vt_flush() and vt_timer() functions instead? The former could handle blinking, while the latter could schedule a new flush in hz / 2 if there are no changes reported by vt_flush(). Note that you would need to improve the vt_resume_flush_timer() and vt_suspend_flush_timer() functions to take care of scheduling a flush earlier if the currently scheduled one would fire in hz / 2. Otherwise, there will be an apparent lag for the user.
sys/dev/vt/vt_core.c | ||
---|---|---|
2613 | Using one callout per window is overkill: only one cursor is displayed at a time. | |
2876 | You are abusing the VBF_CURSOR flag here: it is meant to configure if the cursor should be displayed at all, whether it blinks or not. With the patch, the user can't tell anymore if the cursor should be hidden. Also, the access to vw->vw_buf should be locked. | |
2877 | Flushing the entire window is a bit too much just for changing the cursor state. |