freebsd-nq/sys/dev/syscons
Bruce Evans 912da69951 The switch to kernel terminal context needs to update more than the cursor
position.  Especially the screen size, and potentially everything except
the input state and attributes.  Do this by changing the cursor position
setting method to a general syncing method.

Use proper constructors instead of copying to create kernel terminal
contexts.  We really want clones and not new instances, but there is
no method for cloning and there is nothing in the active instance that
needs to be cloned exactly.

Add proper destructors for kernel terminal contexts.  I doubt that the
destructor code has every been reached, but if it was then it leaked the
memory of the clones.

Remove freeing of statically allocated memory for the non-kernel terminal
context for the same terminal as the kernel.  This is in the nearly
unreachable code.  This used to not happen because delicate context
swapping made the user context use the dynamic memory and kernel
context the static memory.  I didn't restore this swapping since it
would have been unnatural to have all kernel contexts except 1 dynamic.

The constructor for terminal context has bad layering for reasons
related to the bug.  It has to return static memory early before
malloc() works.  Callers also can't allocate memory until after the
first constructor selects an emulator and tells upper layers the size
of its context.  After that, the cloning hack required the cloning
code to allocate the memory, but for all other constructors it would
be better for the terminal layer to allocate and deallocate the
memory in all cases.

Zero the memory when allocating terminal contexts dynamically.
2017-03-29 14:46:26 +00:00
..
apm
blank
daemon
dragon
fade
fire
green
logo
plasma
rain
snake
star
warp
scgfbrndr.c
schistory.c
scmouse.c
scterm-teken.c The switch to kernel terminal context needs to update more than the cursor 2017-03-29 14:46:26 +00:00
scterm.c
scvesactl.c
scvgarndr.c
scvidctl.c
scvtb.c
syscons.c The switch to kernel terminal context needs to update more than the cursor 2017-03-29 14:46:26 +00:00
syscons.h The switch to kernel terminal context needs to update more than the cursor 2017-03-29 14:46:26 +00:00
sysmouse.c