[Kos-cvs] kos/modules/kos wolfgang.c,1.74,1.75
thomas at kos.enix.org
thomas at kos.enix.org
Tue Jan 4 23:09:12 CET 2005
- Previous message: [Kos-cvs] kos/modules/pmm _pmm.c, 1.16, 1.17 _pmm.h, 1.15,
1.16 _pmm_get_page.c, 1.3, 1.4 _pmm_init.c, 1.11,
1.12 _pmm_put_page.c, 1.6, 1.7 pmm.c, 1.13, 1.14 pmm.h, 1.13, 1.14
- Next message: [Kos-cvs] kos ChangeLog,1.50,1.51
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/kos/cvs/kos/modules/kos
In directory the-doors:/tmp/cvs-serv9550
Modified Files:
wolfgang.c
Log Message:
* modules/kos/wolfgang.c (pmm_usage_thread): New thread that
display the number of free physical pages at the bottom of the
screen.
Index: wolfgang.c
===================================================================
RCS file: /home/kos/cvs/kos/modules/kos/wolfgang.c,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -d -r1.74 -r1.75
--- wolfgang.c 29 Dec 2004 19:28:50 -0000 1.74
+++ wolfgang.c 4 Jan 2005 22:09:10 -0000 1.75
@@ -77,6 +77,26 @@
}
}
+static void pmm_usage_thread(void *data)
+{
+ volatile unsigned char *base = (unsigned char *) (screen + (68*2+24*80*2));
+
+ while(TRUE) {
+ char buf[32];
+ uint i;
+ volatile unsigned char *pos;
+
+ snprintf(buf, sizeof(buf), "PMM: %7d", get_free_memory_pages());
+
+ pos = base;
+ for (i = 0; i < strlen(buf) ; i++)
+ {
+ *pos++ = buf[i];
+ *pos++ = 4;
+ }
+ }
+}
+
static void thread_idle(void *data)
{
UNUSED(data);
@@ -954,9 +974,10 @@
create_kernel_thread(NULL, thread_idle, NULL);
kernel_post_init(kp);
create_kernel_thread(NULL, thread_twiddle, (void *)12);
+ create_kernel_thread(NULL, pmm_usage_thread, NULL);
create_kernel_thread(NULL, thread_which_ends, NULL);
- //#define TEST_ARE_DISABLED_BECAUSE_VMM_TEST_FAILS_BECAUSE_LACK_OF_SYNCHRO
+#define TEST_ARE_DISABLED_BECAUSE_VMM_TEST_FAILS_BECAUSE_LACK_OF_SYNCHRO
#ifdef TEST_ARE_DISABLED_BECAUSE_VMM_TEST_FAILS_BECAUSE_LACK_OF_SYNCHRO
test_run_all_tests();
for(;;);
@@ -970,15 +991,6 @@
build_system(kp);
}
-int restricted_test(void);
-int restricted_test(void)
-{
- __dbg_printk("Restricted\n");
- return 0;
-}
-
-EXPORT_FUNCTION_RESTRICTED(restricted_test, vmm);
-
KERNEL_START(kernel_parameter_t *kp)
{
struct thread *primary_thread_id;
- Previous message: [Kos-cvs] kos/modules/pmm _pmm.c, 1.16, 1.17 _pmm.h, 1.15,
1.16 _pmm_get_page.c, 1.3, 1.4 _pmm_init.c, 1.11,
1.12 _pmm_put_page.c, 1.6, 1.7 pmm.c, 1.13, 1.14 pmm.h, 1.13, 1.14
- Next message: [Kos-cvs] kos ChangeLog,1.50,1.51
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Kos-cvs
mailing list