mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-24 02:03:06 -05:00
79ffdb7205
- More work on funneling console output through Console. - init() now breaks off into a separate task ASAP. - ..this leaves the "colonel" task as a simple hlt idle loop. - Mask all IRQs on startup (except IRQ2 for slave passthru) - Fix underallocation bug in Task::allocateRegion(). - Remember how many times each Task has been scheduled. The panel and scheduling banner are disabled until I get things working nicely in the (brave) new Console world.
47 lines
924 B
C++
47 lines
924 B
C++
#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 );
|
|
}
|
|
}
|