Remove remains of the old "panel" task.

...and grow the console by 1 row! :^)
This commit is contained in:
Andreas Kling 2018-10-23 15:47:03 +02:00
parent d90d125dfe
commit 3676214a62
5 changed files with 4 additions and 53 deletions

View file

@ -37,7 +37,7 @@ void Console::putChar(char ch)
switch (ch) {
case '\n':
m_cursorColumn = 0;
if (m_cursorRow == (m_rows - 2)) {
if (m_cursorRow == (m_rows - 1)) {
vga_scroll_up();
} else {
++m_cursorRow;
@ -50,7 +50,7 @@ void Console::putChar(char ch)
++m_cursorColumn;
if (m_cursorColumn >= m_columns) {
if (m_cursorRow == (m_rows - 2)) {
if (m_cursorRow == (m_rows - 1)) {
vga_scroll_up();
} else {
++m_cursorRow;

View file

@ -28,7 +28,6 @@ public:
Handle(AnyHandle) : m_data(0xffffffff) { }
enum KernelTask {
PanelTask = 4001,
DiskTask = 4002,
FileSystemTask = 4003,
MotdTask = 4004,

View file

@ -14,7 +14,6 @@ KERNEL_OBJS = \
PIC.o \
Syscall.o \
DataBuffer.o \
panel.o \
Disk.o \
Userspace.o \
IDEDiskDevice.o \

View file

@ -10,8 +10,8 @@ PRIVATE BYTE current_attr = 0x07;
void vga_scroll_up()
{
memcpy(vga_mem, vga_mem + 160, 160 * 23);
memset(vga_mem + (160 * 23), 0, 160);
memcpy(vga_mem, vga_mem + 160, 160 * 24);
memset(vga_mem + (160 * 24), 0, 160);
}
void vga_putch_at(byte row, byte column, byte ch)

View file

@ -1,47 +0,0 @@
#include "types.h"
#include "Task.h"
#include "VGA.h"
#include "system.h"
#include "i386.h"
#include "i8253.h"
#include "kmalloc.h"
PUBLIC void panel_main() NORETURN;
PUBLIC void
panel_main()
{
WORD c;
BYTE a;
for( ;; )
{
continue;
/* HACK: Avoid getting interrupted while painting since
* that could lead to fugly artifacts ;P */
cli();
c = vga_get_cursor();
a = vga_get_attr();
vga_set_attr( 0x17 );
vga_set_cursor( 80 * 24 );
kprintf(
" Uptime: %u -- %u tasks (%u blocked) kmalloc: %u/%u ",
system.uptime / TICKS_PER_SECOND,
system.nprocess,
system.nblocked,
sum_alloc,
sum_free
);
vga_set_attr( a );
vga_set_cursor( c );
/* HACK cont.d */
sti();
sleep( 1 * TICKS_PER_SECOND );
}
}